LNK2001 error when compiling TugOfWar example

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Justin Wager
Posts: 6
Joined: Sun Jun 09, 2013 10:08 pm

LNK2001 error when compiling TugOfWar example

Post by Justin Wager » Tue Jan 07, 2014 12:17 pm

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

User avatar
Ilan Eskinazi
Posts: 24
Joined: Fri Mar 19, 2010 5:35 am

Re: LNK2001 error when compiling TugOfWar example

Post by Ilan Eskinazi » Thu Jan 09, 2014 7:43 pm

Make sure you added all your additional library directories, additional include directories, and additional dependencies (.lib files)

POST REPLY