Results 1 to 3 of 3

Thread: Large compiler error.

  1. #1

    Exclamation Large compiler error.

    Following the tutorial at Core Grind trying to run the sunset example, but hitting a compile error along the lines of:
    Code:
    /usr/lib/gcc/i686-linux-gnu/4.4.5/../../../../lib/crt1.o: In function `_start':
    (.text+0x18): undefined reference to `main'
    /tmp/cc3KOqjE.o: In function `CL_Console::write_line(CL_StringRef8 const&)':
    sunset.cpp:(.text._ZN10CL_Console10write_lineERK13CL_StringRef8[CL_Console::write_line(CL_StringRef8 const&)]+0xf): undefined reference to `CL_Console::write(CL_StringRef8 const&)'
    sunset.cpp:(.text._ZN10CL_Console10write_lineERK13CL_StringRef8[CL_Console::write_line(CL_StringRef8 const&)]+0x22): undefined reference to `CL_StringRef8::CL_StringRef8(char const*)'
    sunset.cpp:(.text._ZN10CL_Console10write_lineERK13CL_StringRef8[CL_Console::write_line(CL_StringRef8 const&)]+0x2d): undefined reference to `CL_Console::write(CL_StringRef8 const&)'
    sunset.cpp:(.text._ZN10CL_Console10write_lineERK13CL_StringRef8[CL_Console::write_line(CL_StringRef8 const&)]+0x3e): undefined reference to `CL_StringRef8::~CL_StringRef8()'
    sunset.cpp:(.text._ZN10CL_Console10write_lineERK13CL_StringRef8[CL_Console::write_line(CL_StringRef8 const&)]+0x55): undefined reference to `CL_StringRef8::~CL_StringRef8()'
    /tmp/cc3KOqjE.o:(.gcc_except_table+0xe8): undefined reference to `typeinfo for CL_Exception'
    /tmp/cc3KOqjE.o: In function `CL_InterlockedVariable::CL_InterlockedVariable()':
    sunset.cpp:(.text._ZN22CL_InterlockedVariableC1Ev[CL_InterlockedVariable::CL_InterlockedVariable()]+0x16): undefined reference to `CL_System::aligned_alloc(unsigned int, unsigned int)'
    /tmp/cc3KOqjE.o: In function `CL_InterlockedVariable::~CL_InterlockedVariable()':
    sunset.cpp:(.text._ZN22CL_InterlockedVariableD1Ev[CL_InterlockedVariable::~CL_InterlockedVariable()]+0xf): undefined reference to `CL_System::aligned_free(void*)'
    /tmp/cc3KOqjE.o: In function `CL_ClanApplication::CL_ClanApplication(int (*)(std::vector<CL_String8, std::allocator<CL_String8> > const&))':
    sunset.cpp:(.text._ZN18CL_ClanApplicationC1EPFiRKSt6vectorI10CL_String8SaIS1_EEE[CL_ClanApplication::CL_ClanApplication(int (*)(std::vector<CL_String8, std::allocator<CL_String8> > const&))]+0x7): undefined reference to `CL_ClanApplication::main'
    /tmp/cc3KOqjE.o: In function `PrimitivesExample::run()':
    sunset.cpp:(.text._ZN17PrimitivesExample3runEv[PrimitivesExample::run()]+0x15): undefined reference to `CL_DisplayTarget::CL_DisplayTarget()'
    sunset.cpp:(.text._ZN17PrimitivesExample3runEv[PrimitivesExample::run()]+0x28): undefined reference to `CL_StringRef8::CL_StringRef8(char const*)'
    sunset.cpp:(.text._ZN17PrimitivesExample3runEv[PrimitivesExample::run()]+0x69): undefined reference to `CL_DisplayWindow::CL_DisplayWindow(CL_StringRef8 const&, int, int, bool, bool, int, CL_DisplayTarget)'
    sunset.cpp:(.text._ZN17PrimitivesExample3runEv[PrimitivesExample::run()]+0x7a): undefined reference to `CL_StringRef8::~CL_StringRef8()'
    sunset.cpp:(.text._ZN17PrimitivesExample3runEv[PrimitivesExample::run()]+0x8b): undefined reference to `CL_StringRef8::~CL_StringRef8()'
    sunset.cpp:(.text._ZN17PrimitivesExample3runEv[PrimitivesExample::run()]+0x9c): undefined reference to `CL_DisplayWindow::~CL_DisplayWindow()'
    sunset.cpp:(.text._ZN17PrimitivesExample3runEv[PrimitivesExample::run()]+0xb1): undefined reference to `CL_DisplayTarget::~CL_DisplayTarget()'
    sunset.cpp:(.text._ZN17PrimitivesExample3runEv[PrimitivesExample::run()]+0xc8): undefined reference to `CL_DisplayTarget::~CL_DisplayTarget()'
    sunset.cpp:(.text._ZN17PrimitivesExample3runEv[PrimitivesExample::run()]+0xdd): undefined reference to `CL_DisplayWindow::sig_window_close()'
    sunset.cpp:(.text._ZN17PrimitivesExample3runEv[PrimitivesExample::run()]+0x109): undefined reference to `CL_DisplayWindow::get_gc() const'
    sunset.cpp:(.text._ZN17PrimitivesExample3runEv[PrimitivesExample::run()]+0x123): undefined reference to `CL_DisplayWindow::get_ic() const'
    sunset.cpp:(.text._ZN17PrimitivesExample3runEv[PrimitivesExample::run()]+0x133): undefined reference to `CL_InputContext::get_keyboard(int)'
    sunset.cpp:(.text._ZN17PrimitivesExample3runEv[PrimitivesExample::run()]+0x157): undefined reference to `CL_InputDevice::get_keycode(int) const'
    sunset.cpp:(.text._ZN17PrimitivesExample3runEv[PrimitivesExample::run()]+0x186): undefined reference to `CL_DisplayWindow::flip(int)'
    sunset.cpp:(.text._ZN17PrimitivesExample3runEv[PrimitivesExample::run()]+0x192): undefined reference to `CL_KeepAlive::process(int)'
    sunset.cpp:(.text._ZN17PrimitivesExample3runEv[PrimitivesExample::run()]+0x19e): undefined reference to `CL_System::sleep(int)'
    sunset.cpp:(.text._ZN17PrimitivesExample3runEv[PrimitivesExample::run()]+0x1bc): undefined reference to `CL_InputDevice::~CL_InputDevice()'
    sunset.cpp:(.text._ZN17PrimitivesExample3runEv[PrimitivesExample::run()]+0x1cd): undefined reference to `CL_InputDevice::~CL_InputDevice()'
    sunset.cpp:(.text._ZN17PrimitivesExample3runEv[PrimitivesExample::run()]+0x1de): undefined reference to `CL_GraphicContext::~CL_GraphicContext()'
    sunset.cpp:(.text._ZN17PrimitivesExample3runEv[PrimitivesExample::run()]+0x1ef): undefined reference to `CL_GraphicContext::~CL_GraphicContext()'
    sunset.cpp:(.text._ZN17PrimitivesExample3runEv[PrimitivesExample::run()]+0x222): undefined reference to `CL_DisplayWindow::~CL_DisplayWindow()'
    sunset.cpp:(.text._ZN17PrimitivesExample3runEv[PrimitivesExample::run()]+0x239): undefined reference to `CL_DisplayWindow::~CL_DisplayWindow()'
    /tmp/cc3KOqjE.o: In function `PrimitivesExample::draw_sunset(CL_GraphicContext&)':
    sunset.cpp:(.text._ZN17PrimitivesExample11draw_sunsetER17CL_GraphicContext[PrimitivesExample::draw_sunset(CL_GraphicContext&)]+0xd0): undefined reference to `CL_Colorf::black'
    sunset.cpp:(.text._ZN17PrimitivesExample11draw_sunsetER17CL_GraphicContext[PrimitivesExample::draw_sunset(CL_GraphicContext&)]+0x129): undefined reference to `CL_Draw::gradient_fill(CL_GraphicContext&, CL_Rectf const&, CL_Gradient const&)'
    sunset.cpp:(.text._ZN17PrimitivesExample11draw_sunsetER17CL_GraphicContext[PrimitivesExample::draw_sunset(CL_GraphicContext&)]+0x190): undefined reference to `CL_Draw::gradient_fill(CL_GraphicContext&, CL_Rectf const&, CL_Gradient const&)'
    sunset.cpp:(.text._ZN17PrimitivesExample11draw_sunsetER17CL_GraphicContext[PrimitivesExample::draw_sunset(CL_GraphicContext&)]+0x1b5): undefined reference to `CL_Colorf::white'
    sunset.cpp:(.text._ZN17PrimitivesExample11draw_sunsetER17CL_GraphicContext[PrimitivesExample::draw_sunset(CL_GraphicContext&)]+0x1d0): undefined reference to `CL_Draw::circle(CL_GraphicContext&, CL_Pointf const&, float, CL_Colorf const&)'
    sunset.cpp:(.text._ZN17PrimitivesExample11draw_sunsetER17CL_GraphicContext[PrimitivesExample::draw_sunset(CL_GraphicContext&)]+0x21e): undefined reference to `CL_Draw::fill(CL_GraphicContext&, CL_Rectf const&, CL_Colorf const&)'
    sunset.cpp:(.text._ZN17PrimitivesExample11draw_sunsetER17CL_GraphicContext[PrimitivesExample::draw_sunset(CL_GraphicContext&)]+0x262): undefined reference to `CL_Draw::line(CL_GraphicContext&, float, float, float, float, CL_Colorf const&)'
    /tmp/cc3KOqjE.o: In function `Program::main(std::vector<CL_String8, std::allocator<CL_String8> > const&)':
    sunset.cpp:(.text._ZN7Program4mainERKSt6vectorI10CL_String8SaIS1_EE[Program::main(std::vector<CL_String8, std::allocator<CL_String8> > const&)]+0x29): undefined reference to `CL_SetupCore::CL_SetupCore()'
    sunset.cpp:(.text._ZN7Program4mainERKSt6vectorI10CL_String8SaIS1_EE[Program::main(std::vector<CL_String8, std::allocator<CL_String8> > const&)]+0x37): undefined reference to `CL_SetupDisplay::CL_SetupDisplay()'
    sunset.cpp:(.text._ZN7Program4mainERKSt6vectorI10CL_String8SaIS1_EE[Program::main(std::vector<CL_String8, std::allocator<CL_String8> > const&)]+0x45): undefined reference to `CL_SetupGL::CL_SetupGL()'
    sunset.cpp:(.text._ZN7Program4mainERKSt6vectorI10CL_String8SaIS1_EE[Program::main(std::vector<CL_String8, std::allocator<CL_String8> > const&)]+0x85): undefined reference to `CL_StringRef8::CL_StringRef8(char const*)'
    sunset.cpp:(.text._ZN7Program4mainERKSt6vectorI10CL_String8SaIS1_EE[Program::main(std::vector<CL_String8, std::allocator<CL_String8> > const&)]+0xad): undefined reference to `CL_ConsoleWindow::CL_ConsoleWindow(CL_StringRef8 const&, int, int)'
    sunset.cpp:(.text._ZN7Program4mainERKSt6vectorI10CL_String8SaIS1_EE[Program::main(std::vector<CL_String8, std::allocator<CL_String8> > const&)]+0xc1): undefined reference to `CL_StringRef8::~CL_StringRef8()'
    sunset.cpp:(.text._ZN7Program4mainERKSt6vectorI10CL_String8SaIS1_EE[Program::main(std::vector<CL_String8, std::allocator<CL_String8> > const&)]+0xd8): undefined reference to `CL_StringRef8::~CL_StringRef8()'
    sunset.cpp:(.text._ZN7Program4mainERKSt6vectorI10CL_String8SaIS1_EE[Program::main(std::vector<CL_String8, std::allocator<CL_String8> > const&)]+0xed): undefined reference to `CL_Exception::get_message_and_stack_trace()'
    sunset.cpp:(.text._ZN7Program4mainERKSt6vectorI10CL_String8SaIS1_EE[Program::main(std::vector<CL_String8, std::allocator<CL_String8> > const&)]+0x10d): undefined reference to `operator+(char const*, CL_StringData8 const&)'
    sunset.cpp:(.text._ZN7Program4mainERKSt6vectorI10CL_String8SaIS1_EE[Program::main(std::vector<CL_String8, std::allocator<CL_String8> > const&)]+0x128): undefined reference to `CL_String8::operator CL_StringRef8() const'
    sunset.cpp:(.text._ZN7Program4mainERKSt6vectorI10CL_String8SaIS1_EE[Program::main(std::vector<CL_String8, std::allocator<CL_String8> > const&)]+0x14d): undefined reference to `CL_StringRef8::~CL_StringRef8()'
    sunset.cpp:(.text._ZN7Program4mainERKSt6vectorI10CL_String8SaIS1_EE[Program::main(std::vector<CL_String8, std::allocator<CL_String8> > const&)]+0x161): undefined reference to `CL_StringRef8::~CL_StringRef8()'
    sunset.cpp:(.text._ZN7Program4mainERKSt6vectorI10CL_String8SaIS1_EE[Program::main(std::vector<CL_String8, std::allocator<CL_String8> > const&)]+0x175): undefined reference to `CL_String8::~CL_String8()'
    sunset.cpp:(.text._ZN7Program4mainERKSt6vectorI10CL_String8SaIS1_EE[Program::main(std::vector<CL_String8, std::allocator<CL_String8> > const&)]+0x189): undefined reference to `CL_String8::~CL_String8()'
    sunset.cpp:(.text._ZN7Program4mainERKSt6vectorI10CL_String8SaIS1_EE[Program::main(std::vector<CL_String8, std::allocator<CL_String8> > const&)]+0x19a): undefined reference to `CL_String8::~CL_String8()'
    sunset.cpp:(.text._ZN7Program4mainERKSt6vectorI10CL_String8SaIS1_EE[Program::main(std::vector<CL_String8, std::allocator<CL_String8> > const&)]+0x1ab): undefined reference to `CL_String8::~CL_String8()'
    sunset.cpp:(.text._ZN7Program4mainERKSt6vectorI10CL_String8SaIS1_EE[Program::main(std::vector<CL_String8, std::allocator<CL_String8> > const&)]+0x1b9): undefined reference to `CL_ConsoleWindow::display_close_message()'
    sunset.cpp:(.text._ZN7Program4mainERKSt6vectorI10CL_String8SaIS1_EE[Program::main(std::vector<CL_String8, std::allocator<CL_String8> > const&)]+0x1cc): undefined reference to `CL_ConsoleWindow::~CL_ConsoleWindow()'
    sunset.cpp:(.text._ZN7Program4mainERKSt6vectorI10CL_String8SaIS1_EE[Program::main(std::vector<CL_String8, std::allocator<CL_String8> > const&)]+0x1e0): undefined reference to `CL_ConsoleWindow::~CL_ConsoleWindow()'
    sunset.cpp:(.text._ZN7Program4mainERKSt6vectorI10CL_String8SaIS1_EE[Program::main(std::vector<CL_String8, std::allocator<CL_String8> > const&)]+0x215): undefined reference to `CL_SetupGL::~CL_SetupGL()'
    sunset.cpp:(.text._ZN7Program4mainERKSt6vectorI10CL_String8SaIS1_EE[Program::main(std::vector<CL_String8, std::allocator<CL_String8> > const&)]+0x229): undefined reference to `CL_SetupGL::~CL_SetupGL()'
    sunset.cpp:(.text._ZN7Program4mainERKSt6vectorI10CL_String8SaIS1_EE[Program::main(std::vector<CL_String8, std::allocator<CL_String8> > const&)]+0x23d): undefined reference to `CL_SetupDisplay::~CL_SetupDisplay()'
    sunset.cpp:(.text._ZN7Program4mainERKSt6vectorI10CL_String8SaIS1_EE[Program::main(std::vector<CL_String8, std::allocator<CL_String8> > const&)]+0x251): undefined reference to `CL_SetupDisplay::~CL_SetupDisplay()'
    sunset.cpp:(.text._ZN7Program4mainERKSt6vectorI10CL_String8SaIS1_EE[Program::main(std::vector<CL_String8, std::allocator<CL_String8> > const&)]+0x265): undefined reference to `CL_SetupCore::~CL_SetupCore()'
    sunset.cpp:(.text._ZN7Program4mainERKSt6vectorI10CL_String8SaIS1_EE[Program::main(std::vector<CL_String8, std::allocator<CL_String8> > const&)]+0x27f): undefined reference to `CL_SetupCore::~CL_SetupCore()'
    collect2: ld returned 1 exit status
    I am guessing there is something obvious I am missing, since there shouldn't be any problems with the source.

  2. #2
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    You have not linked to any of the ClanLib libraries, clanCore, clanDisplay, clanApp and clanGL libraries. Check the makefile.

  3. #3

    Default

    Thanks, it always something obvious with me. But I guess its better to always run into obvious problems then be in that 1% that gets the untraceable bug.

Similar Threads

  1. ERROR!
    By zackgamer100 in forum Novashell Game Creation System
    Replies: 1
    Last Post: 12-25-2009, 03:52 AM
  2. Replies: 5
    Last Post: 07-06-2009, 01:35 PM
  3. Error with Autopackage
    By Pleng in forum Novashell Game Creation System
    Replies: 9
    Last Post: 05-25-2009, 07:05 AM
  4. Error at startup
    By in forum Other RTsoft Games
    Replies: 3
    Last Post: 06-28-2006, 09:27 AM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •