Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ g++ clanlib.cpp -o clanlib `pkg-config --cflags --libs clanCore-2.3 clanDisplay-2.3 clanGL-2.3`
- /usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/../../../../lib/crt1.o: In function `_start':
- (.text+0x20): undefined reference to `main'
- /tmp/ccvaXs9H.o: In function `CL_ClanApplication::CL_ClanApplication(int (*)(std::vector<CL_String8, std::allocator<CL_String8> > const&))':
- clanlib.cpp:(.text._ZN18CL_ClanApplicationC2EPFiRKSt6vectorI10CL_String8SaIS1_EEE[_ZN18CL_ClanApplicationC5EPFiRKSt6vectorI10CL_String8SaIS1_EEE]+0x13): undefined reference to `CL_ClanApplication::main'
- collect2: ld returned 1 exit status
- #include <ClanLib/core.h>
- #include <ClanLib/application.h>
- class ConsoleProgram
- {
- public:
- static int main(const std::vector<CL_String> &args);
- };
- int ConsoleProgram::main(const std::vector<CL_String> &args)
- {
- // Setup clanCore:
- CL_SetupCore setup_core;
- // Create a console Window if one does not exist:
- CL_ConsoleWindow console_window("Console");
- // Write a line to the console:
- CL_Console::write_line("Hello World!");
- // Wait for a key so the window won't close immediately.
- CL_Console::wait_for_key();
- return 0;
- }
- // Create global application object:
- // You MUST include this line or the application start-up will fail to
- // locate your console application object.
- CL_ClanApplication app(&ConsoleProgram::main);
Add Comment
Please, Sign In to add comment