Page MenuHome

MinGW64 compilation fix for D643 Ghost Context Refactor.
AbandonedPublic

Authored by Antonis Ryakiotakis (psy-fi) on Oct 11 2014, 5:34 AM.

Details

Summary

This patch fixes MinGW64 compiler errors below introduced by D643:

  • undefined symbol ERROR_PROFILE_DOES_NOT_MATCH_DEVICE (0x7E7).
  • "jump to label crosses initialization" errors.

Contributor: aligorith (Joshua Leung) as to the undefined symbol.

Diff Detail

Event Timeline

Tamito Kajiyama (kjym3) retitled this revision from to MinGW64 compilation fix for D643 Ghost Context Refactor..
Tamito Kajiyama (kjym3) updated this object.

GHOST_Context.cpp seems fine, not sure why other changes are made, (initialized to dummy values, never used)

intern/ghost/intern/GHOST_ContextWGL.cpp
348

is this change needed?

722

and again? is this needed? (looks like its not)

Changes in GHOST_Context.cpp have already been committed in the mean time.
https://developer.blender.org/rBdd897de06114d6a39908f82c228027f633359d0b

Revisions in GHOST_ContextWGL.cpp are intended to fix compilation errors reported by @Joshua Leung (aligorith):
http://lists.blender.org/pipermail/bf-committers/2014-October/044322.html

intern\ghost\intern\GHOST_ContextWGL.cpp: In member function 'void GHOST_ContextWGL::initContextWGLEW(PIXELFORMATDESCRIPTOR&)':
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'

I see, the values aren't used in this case, (the goto isnt reading the values)... its a bit messy but since its is simple working code, just leave it?...

That, or get a full mingw build log from ghost/win32 and collect warnings and quiet (all/most) of them.
Rather not do this piecemeal.

Tamito Kajiyama (kjym3) updated this revision to Diff 2712.EditedOct 13 2014, 10:14 AM
Tamito Kajiyama (kjym3) edited edge metadata.

Quiet MinGW64 compiler warnings. See the log below for more detail of the warnings:

Just confirming that we had the same issues as Aligorith and kjym3 here with Windows/MinGW64 and our own patch was nessecary to fix this.

I think I've fixed these issues now.

I decided to remove all intermixed decls in functions that use goto, for consistency.

I would have used something like boost::optional to manage these resources, but the protocol isn't that simple.

Removed equivalent code revisions made by @Jason Wilkins (jwilkins) on git master.

I think I could commit all of these remaining changes. My only question is whether the change to the type of embedder window should also be changed for msvc when compiling for 64 bit.

Antonis Ryakiotakis (psy-fi) abandoned this revision.

Asfar as I've tested this should work now.