APIENTRY undefined in framework.cpp

Issue #26 resolved
Former user created an issue

I get a compilation error when compiling framework.cpp because APIENTRY is not defined.

g++ -MMD -MP -D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -DTIXML_USE_STL -DFREEGLUT_STATIC -DLOAD_X11 -DDEBUG -D_DEBUG -I../freeglut-2.6.0/include -I../glload/include -I../glm- -I../tinyxml -I. -g -o "lib/Debug/framework.o" -c "framework.cpp" framework.cpp:121:15: error: expected initializer before ‘DebugFunc’

I am using the 64-bit version of Ubuntu 11.04, with the distro freeglut (version 2.6.0-1ubuntu2), and gmake for premake build platform.

APIENTRY is normally defined through /usr/include/GL/gl.h, but glload/include/glload/gl_3_3.h defines the include guard __gl_h_ to prevent it from being processed. Although gl_3_3.h defines APIENTRY, it undefines it at the end of the same file.

A simple workaround is to include -DAPIENTRY= to the failing command to having it compile properly. I used make verbose=1 to have make print each command.

I used Mercurial to get the source. hg tip: 270:a841d616964c

Comments (2)

  1. Jason McKesson repo owner
    • changed status to open
    • changed milestone to 0.4

    Oh, that's the new debugging framework I added for 0.4. I haven't tested it on Linux yet, so I don't expect it to work there. Yet.

    This will be fixed for version 0.4.

  2. Log in to comment