Results 1 to 3 of 3

Thread: Unresloved External

  1. #1

    Thread Starter
    PowerPoster Halsafar's Avatar
    Join Date
    Jun 2004
    Location
    Saskatoon, SK
    Posts
    2,339

    Unresloved External

    Alright, I have included some source, which contains 2 files...
    clsTimer.cpp
    clsTimer.h

    Now when I declare the variable in my game
    TimerEngine Timer;

    any place I use it, posts a
    Main.obj : error LNK2001: unresolved external symbol "public: void __thiscall TimerEngine::SetDelta(void)" (?SetDelta@TimerEngine@@QAEXXZ)

    I do not understand.
    The error occurs after Linking.
    Attached Files Attached Files
    "From what was there, and was meant to be, but not of that was faded away." - - Steve Damm

    "The polar opposite of nothingness is existance. When existance calls apon nothingness it shall return to nothingness." - - Steve Damm

    "When you do things right, people won't be sure if you did anything at all." - - God from Futurama

  2. #2

    Thread Starter
    PowerPoster Halsafar's Avatar
    Join Date
    Jun 2004
    Location
    Saskatoon, SK
    Posts
    2,339
    I'm doing a bit of reading and it says inline functions HAVE to be declared within the header file. or it will report a LNK2001 error.

    I added "extern" in front of the function header
    extern void SetStart()
    {
    }

    well that cleared up the errors, replaced them with warnings and the program definetly didn't do very well in running.

    My Delta was staying 0....download the source above.
    Last edited by Halsafar; Aug 30th, 2004 at 01:02 PM.
    "From what was there, and was meant to be, but not of that was faded away." - - Steve Damm

    "The polar opposite of nothingness is existance. When existance calls apon nothingness it shall return to nothingness." - - Steve Damm

    "When you do things right, people won't be sure if you did anything at all." - - God from Futurama

  3. #3
    Fanatic Member riis's Avatar
    Join Date
    Nov 2001
    Posts
    551
    You must define the TimerEngine::SetDelta function. Make sure you've actually written it.

    If the TimerEngine class is a part of a DLL, make sure you've included the lib-file which should come along with the DLL in your project. (Project Settings, link tab, object/library modules)

Posting Permissions

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



Click Here to Expand Forum to Full Width