Hi!
I have a problem with compile the first program with eclipse.
In eclipse I create a project "Managed Make C++ Project" , in project I create a file.cpp with code :
#include <ClanLib/core.h>
#include <ClanLib/application.h>
#include <ClanLib/display.h>
#include <ClanLib/gl.h>
class MyApp : public CL_ClanApplication
{
public:
virtual int main(int argc, char **argv)
{
CL_ConsoleWindow console("Console");
console.redirect_stdio();
try
{
CL_SetupCore setup_core;
CL_SetupDisplay setup_display;
CL_SetupGL setup_gl;
CL_DisplayWindow window("ClanLib application", 640, 480);
while (!CL_Keyboard::get_keycode(CL_KEY_ESCAPE))
{
CL_Display::clear(CL_Color(0, 0, 50));
CL_Display::flip();
CL_System::keep_alive(10);
}
}
catch (CL_Error err)
{
std::cout << err.message.c_str() << std::endl;
}
console.display_close_message();
return 0;
}
} app;
and when compile this error appear :
"undefined reference to main"
"undefined reference to CL_ClanApplication::CL_ClanApplication"
etc.
Why??
I insert in my project the directory of clanlib include..
Please help me
Bookmarks