Thanks for reading this post. I wrote a plugin for a controller and would like to use the model with this controller from within Matlab. The plugin works when I use it in OpenSim, but I cannot get the model to work in Matlab. I get stuck in the first step in which I try to load the plugin in Matlab.
There is already some information on this topic:
http://simtk-confluence.stanford.edu:80 ... ng+Plugins
https://simtk.org/forums/viewtopic.php? ... tlab#p8878
https://simtk.org/forums/viewtopic.php? ... ary#p11969
However, this doesn't help me to get it to work. I have copied the files MyController.dll to the plugin directory of Opensim. Then I added the path to the plugin directory to librarypath.txt, and tried to load the dll with:
Code: Select all
loadlibrary('MyController.dll','C:\Users\bas\Documents\OSanalysis\controllerPlugin\MyController.h','includepath','C:\Program Files\OpenSim 3.3\sdk\include\')
Code: Select all
Warning: Function input has the same name as a MATLAB builtin. We suggest you rename the function to avoid
a potential name conflict.
> In loadlibrary>@()cd(savedir)
In onCleanup/delete (line 60)
In loadlibrary
Warning: Function version has the same name as a MATLAB builtin. We suggest you rename the function to
avoid a potential name conflict.
> In loadlibrary>@()cd(savedir)
In onCleanup/delete (line 60)
In loadlibrary
Error using loadlibrary
Failed to preprocess the input file.
Output from preprocessor is:MyController.h
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\xtgmath.h(214) : warning C4602: #pragma
pop_macro : 'new' no previous #pragma push_macro for this identifier
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\eh.h(27) : fatal error C1189: #error :
"eh.h is only for C++!"
I hope somebody can help me get it to work. Thanks for all your time
Bas