View Full Version : Errors in ClanLib headers

09-02-2007, 04:15 AM
I tried to use this example, saved as Game.cpp:

#include <ClanLib/core.h>
#include <ClanLib/display.h>
#include <ClanLib/gl.h>

class MyClanLibApplication : public CL_ClanApplication
virtual int main(int argc, char** argv)
CL_SetupCore setup_core;
CL_SetupDisplay setup_display;
CL_SetupGL setup_gl;

// run game.

return 0;
} app;

But it doesn't compile for some reason.

[mike@thiscomputer src]$ gcc *.cpp -o game `pkg-config --cflags --libs clanCore-0.8 clanApp-0.8 clanGL-0.8 clanDisplay-0.8`
In file included from /usr/include/ClanLib-0.8/ClanLib/Display/Collision/collision_outline.h:60,
from /usr/include/ClanLib-0.8/ClanLib/display.h:81,
from Game.cpp:2:
/usr/include/ClanLib-0.8/ClanLib/Display/Collision/../../GL/opengl_wrap.h:2533: error: ‘<anonymous>’ has incomplete type
/usr/include/ClanLib-0.8/ClanLib/Display/Collision/../../GL/opengl_wrap.h:2533: error: invalid use of ‘CLvoid’
Game.cpp:6: error: expected class-name before ‘{’ token

What exactly is going on here, and more importantly, how do I fix it?

09-03-2007, 08:17 AM
I believe that this error was recently fixed, in the latest SVN svn://esoteric.clanlib.org/ClanLib/Development/ClanLib-0.8 SVN