Page 1 of 1

[BUG] Compilation problem on OS X

Posted: Sat Dec 12, 2009 17:33
by brucey
In CEGUIOpenGLApplePBTextureTarget.cpp, I get two compilation problems related to an "invalid conversion ‘long int*’ to ‘GLint*’", on calls to CGLGetVirtualScreen() and CGLChoosePixelFormat().
I just added a cast to (GLInt*) and it compiled fine.
eg.

Code: Select all

    if (err = CGLGetVirtualScreen(cctx, (GLint*)&d_screen))

and

Code: Select all

    if (err = CGLChoosePixelFormat(fmtAttrs, &pix_fmt, (GLint*)&fmt_count))

Re: [BUG] Compilation problem on OS X

Posted: Sun Dec 13, 2009 10:07
by CrazyEddie
Hi,

Thanks for this. Just a couple of questions to clarify a little... Is this when being compiled with Xcode? Which version of the development tools is in use? Which SDK version is this being built against?

I really only ask because Mac OS X is one of the platforms I use the most these days and I don't see these issues myself, so would like to try and identify where they are coming from without needing to test a dozen different configurations :)

CE.

Re: [BUG] Compilation problem on OS X

Posted: Sun Dec 13, 2009 10:39
by brucey
CrazyEddie wrote:Hi,
Is this when being compiled with Xcode? Which version of the development tools is in use? Which SDK version is this being built against?


It's being compiled with g++ using a custom make system, but it is using the XCode compile tools.
Building against the latest source from SVN trunk. But this error has occurred since that Mac-specific file was introduced.

The following is some output from the build, which gives an idea of the options being used, etc :

Code: Select all

Compiling:CEGUIOpenGLApplePBTextureTarget.cpp

g++ -arch i386  -w -mmacosx-version-min=10.3 -c -O3 -Iceguiopengl.mod -Ifreetype.mod/include -Iregex.mod/src -Ifreeimage.mod/src -Icegui.mod/cegui/src/implementations/mac -Icegui.mod/cegui/include -Iglew.mod/GL -Icegui.mod/cegui/include/RendererModules/OpenGL  -fexceptions -DPCRE_STATIC -DCEGUI_STATIC -DCEGUI_FALAGARD_RENDERER -DCEGUI_WITH_TINYXML -DCEGUI_CODEC_FREEIMAGE -o
cegui.mod/cegui/src/RendererModules/OpenGL/.bmx/CEGUIOpenGLApplePBTextureTarget.cpp.debug.macos.x86.o
cegui.mod/cegui/src/RendererModules/OpenGL/CEGUIOpenGLApplePBTextureTarget.cpp

cegui.mod/cegui/src/RendererModules/OpenGL/CEGUIOpenGLApplePBTextureTarget.cpp: In constructor ‘CEGUI::OpenGLApplePBTextureTarget::OpenGLApplePBTextureTarget(CEGUI::OpenGLRenderer&)’:
cegui.mod/cegui/src/RendererModules/OpenGL/CEGUIOpenGLApplePBTextureTarget.cpp:67: error: invalid conversion from ‘long int*’ to ‘GLint*’
cegui.mod/cegui/src/RendererModules/OpenGL/CEGUIOpenGLApplePBTextureTarget.cpp:67: error:   initializing argument 2 of ‘CGLError CGLGetVirtualScreen(_CGLContextObject*, GLint*)’


Not such a big deal, as I just hack the code and move on, usually ;-)

Re: [BUG] Compilation problem on OS X

Posted: Sun Dec 13, 2009 11:35
by CrazyEddie
Thanks for the info :) Looking at it, I'd guess it's a difference from the 10.3 SDK (since I only compile against 10.4 normally, this would explain why I do not see the issue). I'll look into it regardless and fix it - to save you a hack in future ;)

CE.