[Bf-committers] [Bf-blender-cvs] [8d084e8] master: Ghost Context Refactor https://developer.blender.org/D643 Separates graphics context creation from window code in Ghost so that they can vary separately.

Tamito KAJIYAMA rd6t-kjym at asahi-net.or.jp
Sat Oct 11 05:39:41 CEST 2014


Filed a patch to fix the MinGW64 compiler errors.

https://developer.blender.org/D825

The second errors are about a jump that skips variable initialization.

-- 
KAJIYAMA, Tamito <rd6t-kjym at asahi-net.or.jp>


On 10/10/2014 20:47, Joshua Leung wrote:
> An update (with yet another error) :/
>
> So, I've patched it this to compile locally by doing:
> #ifdef FREE_WINDOWS
> #  define ERROR_PROFILE_DOES_NOT_MATCH_DEVICE 0x7E7
> #endif
>
>
>
> However, a second compile error that appears under mingw64 and scons is:
>
> Compiling ==> 'GHOST_ContextWGL.cpp'
> In file included from intern\ghost\intern\GHOST_ContextWGL.cpp:34:0:
> intern\ghost\intern\GHOST_ContextWGL.h: In constructor
> 'GHOST_ContextWGL::GHOST_ContextWGL(bool, GHOST_TUns16, HWND, HDC
> , int, int, int, int, int)':
> intern\ghost\intern\GHOST_ContextWGL.h:158:7: warning:
> 'GHOST_ContextWGL::m_hWnd' will be initialized after [-Wreorder]
> intern\ghost\intern\GHOST_ContextWGL.h:157:7: warning:   'HDC__*
> GHOST_ContextWGL::m_hDC' [-Wreorder]
> intern\ghost\intern\GHOST_ContextWGL.cpp:64:1: warning:   when initialized
> here [-Wreorder]
> intern\ghost\intern\GHOST_ContextWGL.cpp: In member function 'void
> GHOST_ContextWGL::initContextWGLEW(PIXELFORMATDESCRIP
> TOR&)':
> intern\ghost\intern\GHOST_ContextWGL.cpp:400:1: warning: jump to label
> 'finalize' [-fpermissive]
> intern\ghost\intern\GHOST_ContextWGL.cpp:356:8: warning:   from here
> [-fpermissive]
> intern\ghost\intern\GHOST_ContextWGL.cpp:358:6: error:   crosses
> initialization of 'int iPixelFormat'
> intern\ghost\intern\GHOST_ContextWGL.cpp:400:1: warning: jump to label
> 'finalize' [-fpermissive]
> intern\ghost\intern\GHOST_ContextWGL.cpp:351:8: warning:   from here
> [-fpermissive]
> intern\ghost\intern\GHOST_ContextWGL.cpp:358:6: error:   crosses
> initialization of 'int iPixelFormat'
> intern\ghost\intern\GHOST_ContextWGL.cpp: In member function 'int
> GHOST_ContextWGL::choose_pixel_format(bool, int, bool,
>   bool, bool)':
> intern\ghost\intern\GHOST_ContextWGL.cpp:653:2: warning: narrowing
> conversion of '(stereoVisual ? 1063 : 1061)' from 'in
> t' to 'DWORD {aka long unsigned int}' inside { } is ill-formed in C++11
> [-Wnarrowing]
> intern\ghost\intern\GHOST_ContextWGL.cpp:653:2: warning: narrowing
> conversion of '(needAlpha ? 8 : 0)' from 'int' to 'BY
> TE {aka unsigned char}' inside { } is ill-formed in C++11 [-Wnarrowing]
> intern\ghost\intern\GHOST_ContextWGL.cpp:653:2: warning: narrowing
> conversion of '(needStencil ? 8 : 0)' from 'int' to '
> BYTE {aka unsigned char}' inside { } is ill-formed in C++11 [-Wnarrowing]
> intern\ghost\intern\GHOST_ContextWGL.cpp: In member function 'virtual
> GHOST_TSuccess GHOST_ContextWGL::initializeDrawing
> Context()':
> intern\ghost\intern\GHOST_ContextWGL.cpp:861:1: warning: jump to label
> 'error' [-fpermissive]
> intern\ghost\intern\GHOST_ContextWGL.cpp:721:8: warning:   from here
> [-fpermissive]
> intern\ghost\intern\GHOST_ContextWGL.cpp:725:6: error:   crosses
> initialization of 'int lastPFD'
>
> scons: ***
> [C:\blenderdev\trunk\build\intern\ghost\intern\GHOST_ContextWGL.o] Error 1
> scons: building terminated because of errors.
>
>
> This time I'm admittedly completely stumped trying to figure out what
> exactly is the error here...
>
>
> On Sat, Oct 11, 2014 at 12:23 AM, Joshua Leung <aligorith at gmail.com> wrote:
>
>> Trying to compile using mingw64 using scons currently fails on
>> GHOST_Context.cpp:
>>
>>
>> Compiling ==> 'GHOST_Context.cpp'
>> intern\ghost\intern\GHOST_Context.cpp: In function 'bool win32_chk(bool,
>> const char*, int, const char*)':
>> intern\ghost\intern\GHOST_Context.cpp:87:9: error:
>> 'ERROR_PROFILE_DOES_NOT_MATCH_DEVICE' was not declared in this scope
>> intern\ghost\intern\GHOST_Context.cpp:125:7: warning: format '%d' expects
>> argument of type 'int', but argument 3 has typ
>> e 'DWORD {aka long unsigned int}' [-Wformat]
>> intern\ghost\intern\GHOST_Context.cpp:125:7: warning: format '%d' expects
>> argument of type 'int', but argument 3 has typ
>> e 'DWORD {aka long unsigned int}' [-Wformat]
>>
>>
>> Unfortunately, 'ERROR_PROFILE_DOES_NOT_MATCH_
>> DEVICE' just doesn't seem to be defined in any header anywhere
>>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>


More information about the Bf-committers mailing list