C++ Opensim API problem

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Xijin Hua
Posts: 29
Joined: Tue Feb 12, 2019 4:45 pm

C++ Opensim API problem

Post by Xijin Hua » Thu Oct 29, 2020 5:14 pm

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
Attachments
SimpleArm.cpp
(3.23 KiB) Downloaded 4 times

Tags:

User avatar
Thomas Uchida
Posts: 1789
Joined: Wed May 16, 2012 11:40 am

Re: C++ Opensim API problem

Post by Thomas Uchida » Fri Oct 30, 2020 2:09 pm

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)?

POST REPLY