linking problems (I think)

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • linking problems (I think)

      Hi there,

      So I've start hacking the teapot wars code, and started a new project which uses the gamecode base.

      Anyway, after a bunch of changes and chasing of bugs, i can't get it to compile. Getting:

      edBase.obj : error LNK2019: unresolved external symbol "void __cdecl ListenForEarthdawnGameCommands(class boost::shared_ptr<class IEventListener>)" (?ListenForEarthdawnGameCommands@@YAXV?$shared_ptr@VIEventListener@@@boost@@@Z) referenced in function "protected: virtual class BaseGame * __thiscall EarthdawnGameApp::VCreateGameAndView(void)" (?VCreateGameAndView@EarthdawnGameApp@@MAEPAVBaseGame@@XZ)
      edBase.obj : error LNK2001: unresolved external symbol "void __cdecl ListenForEarthdawnGameCommands(class boost::shared_ptr<class IEventListener>)" (?ListenForEarthdawnGameCommands@@YAXV?$shared_ptr@VIEventListener@@@boost@@@Z)
      ..\Test/Earthdawnd.exe : fatal error LNK1120: 1 unresolved externals

      (edBase.cpp is a new version of TeapotWars.cpp).

      Any ideas? Is it not able to find the obj files or is it something to do with boost? It compiles fine.

      thanks,

      andolyne
    • Did you forget to include a cpp file into the project?

      Maybe a dll is missing from the active directory. Make sure all DLLs are in the same place as the executable, and set your proj to delay load the DLLs (not sure if delay loading helps, here).

      The other thing might be your libs not being found. Set your proj to be able to find the libs in the proper directories. If your proj is dependent on other libs being built first, then check your project dependencies, and make sure that the projects that need libs get built after the projects that build those libs.

      Sorry about the general instructions. I'll get more specific if you write again.
    • ListenForEarthdawnGameCommands() is causing the trouble - perhaps you've got an overloaded method that isn't defined anywhere?
      Mr.Mike
      Author, Programmer, Brewer, Patriot
    • Originally posted by mrmike
      ListenForEarthdawnGameCommands() is causing the trouble - perhaps you've got an overloaded method that isn't defined anywhere?

      *cheers* for MrMike the knower of all things wise.

      Found it, undefined function, looks like I forgot to update something in the events.cpp file :)

      andolyne
    • Oh man I'm good.....
      Mr.Mike
      Author, Programmer, Brewer, Patriot