Results 1 to 2 of 2

Thread: unresolved external symbol Error

  1. #1
    Join Date
    Feb 2008

    Default unresolved external symbol Error

    After browsing through the threads in the hope of finding a solution, my problem still remained.
    The examples compile without a problem, but with my own project i get this error :

    1>------ Build started: Project: FirstClanlibapp, Configuration: Release Win32 ------
    1>app.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall cClanLibApp::~cClanLibApp(void)" (??1cClanLibApp@@UAE@XZ)
    1>app.obj : error LNK2001: unresolved external symbol "public: __thiscall cClanLibApp::cClanLibApp(void)" (??0cClanLibApp@@QAE@XZ)

    Code :

    #pragma once
    #include <ClanLib/core.h>
    #include <ClanLib/display.h>
    #include <ClanLib/gl.h>
    #include <ClanLib/application.h>
    #include <ClanLib/sound.h>

    class cClanLibApp : public CL_ClanApplication {


    virtual int main(int, char **){

    CL_SetupCore setup_core;
    CL_SetupDisplay setup_display;
    CL_SetupGL setup_gl;
    CL_SetupSound setup_sound;

    CL_DisplayWindow window("Test", 640, 480);

    return 0;

    Mind you i am still learning c++.
    I use Visual Studio 2005 express edition and Clanlib 0.8.

    Thanks in advance

    Edit :

    Following the tic-tac-toe tutorial, it all worked. Dont know what really went wrong here.
    Last edited by Jorda; 02-04-2008 at 02:23 PM.

  2. #2
    Join Date
    Jan 2007


    you missed to define the constructor
    and the destructor

    which you declared. (the linker doesn't find the body of the functions "unresolved external symbol")

    2 Solutions:
    you write at the end of the file
    cClanLibApp::cClanLibApp() { }
    cClanLibApp::~cClanLibApp() { }

    you write the body of the functions in the classdefinition
    cClanLibApp() { } instead of cClanLibApp();
    ~cClanLibApp() {} instead of ~cClanLibApp();

    happy C++ learning :-)

Similar Threads

  1. Help! linking error
    By thfai2000 in forum Official ClanLib SDK Forums
    Replies: 4
    Last Post: 10-30-2008, 04:30 AM
  2. SiS graphic error
    By Scriptiz in forum Novashell Game Creation System
    Replies: 7
    Last Post: 06-10-2007, 07:15 PM
  3. Music error
    By Scriptiz in forum Dink Smallwood HD
    Replies: 0
    Last Post: 05-28-2007, 03:50 PM
  4. error compiling 0.9 svn
    By voudras in forum Official ClanLib SDK Forums
    Replies: 0
    Last Post: 01-11-2007, 06:47 AM
  5. Error at startup
    By in forum Other RTsoft Games
    Replies: 3
    Last Post: 06-28-2006, 09:27 AM



Posting Permissions

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