Error load plugin in Matlab
Posted: Wed Dec 14, 2016 10:51 am
Hi,
Sorry for bringing a old topic.
I am trying to build the tutorial of plugin an Analysis tool and CoupledBushingForce provided by OpenSim.
I am able to use them in OpenSim GUI. But they does not work in Matlab.
Although I have read some other related posts:
viewtopicPhpbb.php?f=91&t=3942&p=8878&h ... tlab#p8878
viewtopicPhpbb.php?f=91&t=5974&p=15163&start=0&view=
http://simtk-confluence.stanford.edu:80 ... ng+Plugins
I am still not able to get it works.
When I used loadlibrary(pathDLL, pathHeader), the error I got for the Analysis plugin is:
"...C:\OpenSim 3.3\sdk\include\OpenSim\Simulation\Model\Analysis.h(32) : fatal error C1083: Cannot open include file:
'OpenSim/Simulation/osimSimulationDLL.h': No such file or directory"
the error with CoupledBushingForce is:
"...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 also tried to used Model.LoadOpenSimLibrary(pathtoDLL), although this command runs without showing error, when I try to use the plugin class (eg. force = CoupledBushingForce(); ), it shows "Undefined function or variable 'CoupledBushingForce'."
I have tried to create a simple dll function, and load in Matlab, and it works well
(http://stackoverflow.com/questions/1841 ... and-matlab)
I wonder is there any differences between creating a dll which is a class and dll which is a function.
Thank you for reading my long post.
Vinh
Sorry for bringing a old topic.
I am trying to build the tutorial of plugin an Analysis tool and CoupledBushingForce provided by OpenSim.
I am able to use them in OpenSim GUI. But they does not work in Matlab.
Although I have read some other related posts:
viewtopicPhpbb.php?f=91&t=3942&p=8878&h ... tlab#p8878
viewtopicPhpbb.php?f=91&t=5974&p=15163&start=0&view=
http://simtk-confluence.stanford.edu:80 ... ng+Plugins
I am still not able to get it works.
When I used loadlibrary(pathDLL, pathHeader), the error I got for the Analysis plugin is:
"...C:\OpenSim 3.3\sdk\include\OpenSim\Simulation\Model\Analysis.h(32) : fatal error C1083: Cannot open include file:
'OpenSim/Simulation/osimSimulationDLL.h': No such file or directory"
the error with CoupledBushingForce is:
"...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 also tried to used Model.LoadOpenSimLibrary(pathtoDLL), although this command runs without showing error, when I try to use the plugin class (eg. force = CoupledBushingForce(); ), it shows "Undefined function or variable 'CoupledBushingForce'."
I have tried to create a simple dll function, and load in Matlab, and it works well
(http://stackoverflow.com/questions/1841 ... and-matlab)
I wonder is there any differences between creating a dll which is a class and dll which is a function.
Thank you for reading my long post.
Vinh