I suppose you are using my mex wrapper, which is based on an older version of OpenSim that has different CMake configuration.
You should place the register function in the beginning of the program so that the object is recognized afterwards.
Access EOM/ ODE to perform FWD outside Opensim
- Dimitar Stanev
- Posts: 1096
- Joined: Fri Jan 31, 2014 5:14 am
- Lars Boers
- Posts: 14
- Joined: Thu Sep 06, 2018 2:23 am
Re: Access EOM/ ODE to perform FWD outside Opensim
Hi Dimitar, thanks for all the help so far,
I checked out the repo you sent me, however my OpenSim CMakeList was already the same as this code so I left it as is.
As of right now, mexplus.h isn't recognized (fatal error C1083: Cannot open include file: 'mexplus.h': No such file or directory), and my personal links/ invclusion functions don't seem to change this. Do you have any idea how to add mexplus to the path within the CMake code?
Lastly, when I input the CoordinatorActuator registry code into the EngineMatlab.h, it gives the following errors:
c:\users\lsboe\documents\opensimmatlab\src\matlab\EngineMatlab.h(20): error C2653: 'Object': is not a class or namespace c:\users\lsboe\documents\opensimmatlab\src\matlab\EngineMatlab.h(20): error C3861: 'CoordinateActuator': identifier not found
c:\users\lsboe\documents\opensimmatlab\src\matlab\EngineMatlab.h(20): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
Could you tell me why this error is generated?
Regards,
Lars Boers
I checked out the repo you sent me, however my OpenSim CMakeList was already the same as this code so I left it as is.
As of right now, mexplus.h isn't recognized (fatal error C1083: Cannot open include file: 'mexplus.h': No such file or directory), and my personal links/ invclusion functions don't seem to change this. Do you have any idea how to add mexplus to the path within the CMake code?
Lastly, when I input the CoordinatorActuator registry code into the EngineMatlab.h, it gives the following errors:
c:\users\lsboe\documents\opensimmatlab\src\matlab\EngineMatlab.h(20): error C2653: 'Object': is not a class or namespace c:\users\lsboe\documents\opensimmatlab\src\matlab\EngineMatlab.h(20): error C3861: 'CoordinateActuator': identifier not found
c:\users\lsboe\documents\opensimmatlab\src\matlab\EngineMatlab.h(20): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
Could you tell me why this error is generated?
Regards,
Lars Boers
- Dimitar Stanev
- Posts: 1096
- Joined: Fri Jan 31, 2014 5:14 am
Re: Access EOM/ ODE to perform FWD outside Opensim
Hi,
These errors have nothing to do with OpenSim. I suggest that you read more about C++ and CMake building process. Read about compilation, linking, dynamic linking, how to find external headers, external static libraries for the linking, C++ namespace, C++ basics, etc. We may be able to help you resolve this problem, but you will run into similar problems and will not know how to resolve them. Please note that it is very difficult to find what is missing without providing the source code
Kind regards
These errors have nothing to do with OpenSim. I suggest that you read more about C++ and CMake building process. Read about compilation, linking, dynamic linking, how to find external headers, external static libraries for the linking, C++ namespace, C++ basics, etc. We may be able to help you resolve this problem, but you will run into similar problems and will not know how to resolve them. Please note that it is very difficult to find what is missing without providing the source code
Probably, CMake didn't find the Matlab directories correctly.fatal error C1083: Cannot open include file: 'mexplus.h': No such file or directory
Maybe: OpenSim::Object:: ...'Object': is not a class or namespace
Kind regards