Linking error

  • Thread starter michael.goossens
  • Start date
M

michael.goossens

1>IntroState.obj : error LNK2019: unresolved external symbol "public:
void __thiscall GameState::pushState(class GameState *)" (?
pushState@GameState@@QAEXPAV1@@Z) referenced in function "public:
virtual void __thiscall IntroState::keyReleased(class OIS::KeyEvent
const &)" (?keyReleased@IntroState@@UAEXABVKeyEvent@OIS@@@Z)
1>bin\Debug\SparkRushBuild.exe : fatal error LNK1120: 1 unresolved
externals

Any idea of what the problem might be? Can't post all the code because
its alot but will put up the code where the error occurs:

void IntroState::keyReleased(const OIS::KeyEvent &e) {
if(e.key == OIS::KC_ESCAPE)
this->requestShutdown();
if(e.key == OIS::KC_RETURN)
this->pushState(PlayState::getSingletonPtr());
}

pushState is actually a member function in the super class and takes
arguments of the type "GameState *"
 
M

Michael DOUBEZ

(e-mail address removed) a écrit :
1>IntroState.obj : error LNK2019: unresolved external symbol "public:
void __thiscall GameState::pushState(class GameState *)" (?
pushState@GameState@@QAEXPAV1@@Z) referenced in function "public:
virtual void __thiscall IntroState::keyReleased(class OIS::KeyEvent
const &)" (?keyReleased@IntroState@@UAEXABVKeyEvent@OIS@@@Z)
1>bin\Debug\SparkRushBuild.exe : fatal error LNK1120: 1 unresolved
externals

Any idea of what the problem might be? Can't post all the code because
its alot but will put up the code where the error occurs:

void IntroState::keyReleased(const OIS::KeyEvent &e) {
if(e.key == OIS::KC_ESCAPE)
this->requestShutdown();
if(e.key == OIS::KC_RETURN)
this->pushState(PlayState::getSingletonPtr());
}

pushState is actually a member function in the super class and takes
arguments of the type "GameState *"

The linker is telling you that it couldn't find the symbol; I guess you
didn't not define the member or your are not linking with the object
file or library containing the body of the superclass.

Michael
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Linking error .. 3
Linking error 5
linking error with inline functions 0
Why does the compiler cannot pass? 1
singleton question 6
Linking problem 6
Cross platform compilation 3
templates?? 2

Staff online

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,071
Latest member
MetabolicSolutionsKeto

Latest Threads

Top