Guest User

Untitled

a guest
May 20th, 2018
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. $ g++ clanlib.cpp -o clanlib `pkg-config --cflags --libs clanCore-2.3 clanDisplay-2.3 clanGL-2.3`
  2. /usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/../../../../lib/crt1.o: In function `_start':
  3. (.text+0x20): undefined reference to `main'
  4. /tmp/ccvaXs9H.o: In function `CL_ClanApplication::CL_ClanApplication(int (*)(std::vector<CL_String8, std::allocator<CL_String8> > const&))':
  5. clanlib.cpp:(.text._ZN18CL_ClanApplicationC2EPFiRKSt6vectorI10CL_String8SaIS1_EEE[_ZN18CL_ClanApplicationC5EPFiRKSt6vectorI10CL_String8SaIS1_EEE]+0x13): undefined reference to `CL_ClanApplication::main'
  6. collect2: ld returned 1 exit status
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17. #include <ClanLib/core.h>
  18. #include <ClanLib/application.h>
  19.  
  20. class ConsoleProgram
  21. {
  22. public:
  23. static int main(const std::vector<CL_String> &args);
  24. };
  25.  
  26. int ConsoleProgram::main(const std::vector<CL_String> &args)
  27. {
  28. // Setup clanCore:
  29. CL_SetupCore setup_core;
  30.  
  31. // Create a console Window if one does not exist:
  32. CL_ConsoleWindow console_window("Console");
  33.  
  34. // Write a line to the console:
  35. CL_Console::write_line("Hello World!");
  36.  
  37. // Wait for a key so the window won't close immediately.
  38. CL_Console::wait_for_key();
  39.  
  40. return 0;
  41. }
  42.  
  43. // Create global application object:
  44. // You MUST include this line or the application start-up will fail to
  45. // locate your console application object.
  46. CL_ClanApplication app(&ConsoleProgram::main);
Add Comment
Please, Sign In to add comment