Visual Studio compilation errors ExampleMain
Posted: Mon Jun 11, 2012 8:53 am
I've been trying to compile the tugOfWar from ExampleMain, but although everything was fine with cmake, when I try to build in Visual Studio 10. I get the following:
3>------ Build started: Project: Example Main, Configuration: Release x64 ------
3>Build started 6/11/2012 8:43:00 AM.
3>PrepareForBuild:
3> Creating directory "C:\Users\Juan\Documents\OpenSimWorkspace\ExampleMain\build\Release\".
3>InitializeBuildStatus:
3> Creating "TugOfWar1_CreateModel.dir\Release\Example Main.unsuccessfulbuild" because "AlwaysCreate" was specified.
3>CustomBuild:
3> Building Custom Rule C:/Users/Juan/Documents/OpenSimWorkspace/ExampleMain/CMakeLists.txt
3> CMake does not need to re-run because C:\Users\Juan\Documents\OpenSimWorkspace\ExampleMain\build\CMakeFiles\generate.stamp is up-to-date.
3>ClCompile:
3> TugOfWar1_CreateModel.cpp
3>C:/OpenSim2.4.0/sdk/include\OpenSim/Simulation/Model/ModelComponent.h(96): warning C4267: 'return' : conversion from 'size_t' to 'int', possible loss of data
3>TugOfWar1_CreateModel.obj : error LNK2019: unresolved external symbol __imp_RegisterTypes_osimTools referenced in function "public: __cdecl osimInstantiator::osimInstantiator(void)" (??0osimInstantiator@@QEAA@XZ)
3>TugOfWar1_CreateModel.obj : error LNK2019: unresolved external symbol __imp_RegisterTypes_osimAnalyses referenced in function "public: __cdecl osimInstantiator::osimInstantiator(void)" (??0osimInstantiator@@QEAA@XZ)
3>TugOfWar1_CreateModel.obj : error LNK2019: unresolved external symbol __imp_RegisterTypes_osimActuators referenced in function "public: __cdecl osimInstantiator::osimInstantiator(void)" (??0osimInstantiator@@QEAA@XZ)
3>TugOfWar1_CreateModel.obj : error LNK2019: unresolved external symbol __imp_RegisterTypes_osimSimulation referenced in function "public: __cdecl osimInstantiator::osimInstantiator(void)" (??0osimInstantiator@@QEAA@XZ)
3>TugOfWar1_CreateModel.obj : error LNK2019: unresolved external symbol __imp_RegisterTypes_osimCommon referenced in function "public: __cdecl osimInstantiator::osimInstantiator(void)" (??0osimInstantiator@@QEAA@XZ)
3>TugOfWar1_CreateModel.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl OpenSim::StateVector::~StateVector(void)" (__imp_??1StateVector@OpenSim@@UEAA@XZ) referenced in function "public: virtual void * __cdecl OpenSim::StateVector::`vector deleting destructor'(unsigned int)" (??_EStateVector@OpenSim@@UEAAPEAXI@Z)
3>TugOfWar1_CreateModel.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl OpenSim::Exception::~Exception(void)" (__imp_??1Exception@OpenSim@@UEAA@XZ) referenced in function main$catch$0
3>TugOfWar1_CreateModel.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: char const * __cdecl OpenSim::Exception::getMessage(void)const " (__imp_?getMessage@Exception@OpenSim@@QEBAPEBDXZ) referenced in function main$catch$0
3>TugOfWar1_CreateModel.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl OpenSim::Model::~Model(void)" (__imp_??1Model@OpenSim@@UEAA@XZ) referenced in function main
3>TugOfWar1_CreateModel.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __cdecl OpenSim::Object::setName(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_?setName@Object@OpenSim@@QEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function main
3>TugOfWar1_CreateModel.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl OpenSim::Model::Model(void)" (__imp_??0Model@OpenSim@@QEAA@XZ) referenced in function main
3>C:\Users\Juan\Documents\OpenSimWorkspace\ExampleMain\build\Release\TugOfWar1_CreateModel.exe : fatal error LNK1120: 11 unresolved externals
3>
3>Build FAILED.
Not sure what the problem is. Previously I was using visual c++ express and saw a suggestion to not use express, so I uninstalled express and installed visual studio, I deleted everything and started over with cmake and still got the same error message shown above when I try to build with visual studio.
3>------ Build started: Project: Example Main, Configuration: Release x64 ------
3>Build started 6/11/2012 8:43:00 AM.
3>PrepareForBuild:
3> Creating directory "C:\Users\Juan\Documents\OpenSimWorkspace\ExampleMain\build\Release\".
3>InitializeBuildStatus:
3> Creating "TugOfWar1_CreateModel.dir\Release\Example Main.unsuccessfulbuild" because "AlwaysCreate" was specified.
3>CustomBuild:
3> Building Custom Rule C:/Users/Juan/Documents/OpenSimWorkspace/ExampleMain/CMakeLists.txt
3> CMake does not need to re-run because C:\Users\Juan\Documents\OpenSimWorkspace\ExampleMain\build\CMakeFiles\generate.stamp is up-to-date.
3>ClCompile:
3> TugOfWar1_CreateModel.cpp
3>C:/OpenSim2.4.0/sdk/include\OpenSim/Simulation/Model/ModelComponent.h(96): warning C4267: 'return' : conversion from 'size_t' to 'int', possible loss of data
3>TugOfWar1_CreateModel.obj : error LNK2019: unresolved external symbol __imp_RegisterTypes_osimTools referenced in function "public: __cdecl osimInstantiator::osimInstantiator(void)" (??0osimInstantiator@@QEAA@XZ)
3>TugOfWar1_CreateModel.obj : error LNK2019: unresolved external symbol __imp_RegisterTypes_osimAnalyses referenced in function "public: __cdecl osimInstantiator::osimInstantiator(void)" (??0osimInstantiator@@QEAA@XZ)
3>TugOfWar1_CreateModel.obj : error LNK2019: unresolved external symbol __imp_RegisterTypes_osimActuators referenced in function "public: __cdecl osimInstantiator::osimInstantiator(void)" (??0osimInstantiator@@QEAA@XZ)
3>TugOfWar1_CreateModel.obj : error LNK2019: unresolved external symbol __imp_RegisterTypes_osimSimulation referenced in function "public: __cdecl osimInstantiator::osimInstantiator(void)" (??0osimInstantiator@@QEAA@XZ)
3>TugOfWar1_CreateModel.obj : error LNK2019: unresolved external symbol __imp_RegisterTypes_osimCommon referenced in function "public: __cdecl osimInstantiator::osimInstantiator(void)" (??0osimInstantiator@@QEAA@XZ)
3>TugOfWar1_CreateModel.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl OpenSim::StateVector::~StateVector(void)" (__imp_??1StateVector@OpenSim@@UEAA@XZ) referenced in function "public: virtual void * __cdecl OpenSim::StateVector::`vector deleting destructor'(unsigned int)" (??_EStateVector@OpenSim@@UEAAPEAXI@Z)
3>TugOfWar1_CreateModel.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl OpenSim::Exception::~Exception(void)" (__imp_??1Exception@OpenSim@@UEAA@XZ) referenced in function main$catch$0
3>TugOfWar1_CreateModel.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: char const * __cdecl OpenSim::Exception::getMessage(void)const " (__imp_?getMessage@Exception@OpenSim@@QEBAPEBDXZ) referenced in function main$catch$0
3>TugOfWar1_CreateModel.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl OpenSim::Model::~Model(void)" (__imp_??1Model@OpenSim@@UEAA@XZ) referenced in function main
3>TugOfWar1_CreateModel.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __cdecl OpenSim::Object::setName(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_?setName@Object@OpenSim@@QEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function main
3>TugOfWar1_CreateModel.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl OpenSim::Model::Model(void)" (__imp_??0Model@OpenSim@@QEAA@XZ) referenced in function main
3>C:\Users\Juan\Documents\OpenSimWorkspace\ExampleMain\build\Release\TugOfWar1_CreateModel.exe : fatal error LNK1120: 11 unresolved externals
3>
3>Build FAILED.
Not sure what the problem is. Previously I was using visual c++ express and saw a suggestion to not use express, so I uninstalled express and installed visual studio, I deleted everything and started over with cmake and still got the same error message shown above when I try to build with visual studio.