Page 1 of 1

C++ Opensim API problem

Posted: Thu Oct 29, 2020 5:14 pm
by xhua
Dear OpenSim experts:

I am testing the C++ OpenSim API, and trying an example of a simple arm model which is developed using C++. I have attached the C++ code in attachment for your reference. However, when I run the model in Visual Studio Developer Command Prompt, it is not working and gives the following error:

SimpleArm.cpp(1): fatal error C1083: Cannot open include file: 'OpenSim/OpenSim.h': No such file or directory

I can find the OpenSim.h file in my installation directory (eg. C:\OpenSim 4.1\sdk\include\OpenSim), I am not sure why it can not find the OpenSim.h file. Could you please tell me how to solve this problem? Thank you very much in advance.

Best regards

Xijin

Re: C++ Opensim API problem

Posted: Fri Oct 30, 2020 2:09 pm
by tkuchida
Did you run CMake? Have you seen the "How to Build a C++ Example" page in the documentation (https://simtk-confluence.stanford.edu/p ... d=29165309) and/or the examples on GitHub (e.g., https://github.com/opensim-org/opensim- ... amicWalker)?