failed to compile example

SimTKcore exists as a separate project to provide 'one stop shopping' for SimTK Core software and support, although the software is actually developed as a set of interdependent projects. SimTK 1.0 was released in March 2008, SimTK 2.0 in December, 2009.
POST REPLY
User avatar
chen peng
Posts: 3
Joined: Fri Oct 17, 2008 8:36 pm

failed to compile example

Post by chen peng » Tue Oct 28, 2008 12:39 am

hi!
i installed SimTKcore_RelWithDebInfo.exe (50737 kB) in windows xp,my platform is vc2005,i try to compile examples ExampleKneeJoint.cpp in SimTKExamples1.5Updated.zip,but got the following errors:
simtk_test.obj : error LNK2019: unresolved external symbol "public: static class SimTK::Stage const SimTK::Stage::Acceleration" (?Acceleration@Stage@SimTK@@2V12@B),referenced in function _main

if i comment out the following line:
system.realize(state, Stage::Acceleration);
then it's ok.
Other examples like ExampleDynamicWalker.cpp has the same phenomenon. how can i get around of it?






User avatar
Joy Ku
Posts: 81
Joined: Tue Oct 02, 2007 5:22 pm

RE: failed to compile example

Post by Joy Ku » Tue Oct 28, 2008 10:16 am

Hi Chen,

It sounds like you may not be linking to all the libraries. Make sure you are using the following library names:

SimTKmolmodel.lib
SimTKsimbody.lib
SimTKmath.lib
SimTKcpodes.lib
SimTKcommon.lib
SimTKlapack.lib
SimTKsimbody_aux.lib

I believe there's an error in the notes that list some of the library names with an "_d" in them.

Joy

User avatar
chen peng
Posts: 3
Joined: Fri Oct 17, 2008 8:36 pm

RE: failed to compile example

Post by chen peng » Tue Oct 28, 2008 8:51 pm

hi joy,
i checked and find i already linking the above librarys. the following is the setting of vc2005:

linking:
/OUT:"F:\zju\source_code\simTK_test\simtk_test\Debug\simtk_test.exe" /NOLOGO /LIBPATH:"G:\simTK\core\lib" /LIBPATH:"G:\simTK\core\bin" /MANIFEST /MANIFESTFILE:"Debug\simtk_test.exe.intermediate.manifest" /ERRORREPORT:PROMPT SimTKmolmodel.lib SimTKsimbody.lib SimTKmath.lib SimTKcpodes.lib SimTKcommon.lib simTKlapack.lib SimTKsimbody_aux.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib

compile:
/O2 /I "G:\simTK\core\include" /I "G:\simTK\core\include\molmodel\internal" /FD /EHsc /MT /Fo"Debug\\" /Fd"Debug\vc80.pdb" /nologo /c /TP /errorReport:prompt

and i find these librarys in G:\simTK\core\lib.
so what's the problem?
thanks.

User avatar
chen peng
Posts: 3
Joined: Fri Oct 17, 2008 8:36 pm

RE: failed to compile example

Post by chen peng » Tue Nov 04, 2008 12:32 am

Hi,Joy!
I setup a new win32 project. I follow the step one by one in the notes exactlly and now it is ok!
Thanks.

POST REPLY