I am having some trouble with the TugOfWar example, particularly the lines involving PrescribedController and Controller. I get the following error when I try to compile the code.
2>TugOfWar_Complete.obj : error LNK2001: unresolved external symbol "private: virtual void __thiscall OpenSim::Controller::constructProperties(void)" (?constructProperties@Controller@OpenSim@@EAEXXZ)
2>TugOfWar_Complete.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall OpenSim::PrescribedController::setupProperties(void)" (?setupProperties@PrescribedController@OpenSim@@MAEXXZ)
When I remove the section of the source code that defines the controls for the model, the code compiles, runs, and shows up in the OpenSim GUI without muscle controls. Adding the controls section back in causes the error.
I have both Controller.h and PrescribedController.h in my external dependencies.
Any help would be appreciated.
Thanks,
Justin
CMake 2.8.12.1
OpenSim 3.1
Visual C++ 2010 Express
LNK2001 error when compiling TugOfWar example
- Justin Wager
- Posts: 6
- Joined: Sun Jun 09, 2013 10:08 pm
- Ilan Eskinazi
- Posts: 24
- Joined: Fri Mar 19, 2010 5:35 am
Re: LNK2001 error when compiling TugOfWar example
Make sure you added all your additional library directories, additional include directories, and additional dependencies (.lib files)