Page 1 of 1

Can't compile openSimSFunction

Posted: Tue Jul 31, 2012 8:38 pm
by paolotommasino
Dear All,

I am working with a Windows XP workstation, Matlab R2011b, OpenSim 2.4.0 and Visual C++ 2010 Express.

When I run the script ''compileOpenSimSFunction.m'' (in the block folder) the following error happens:

Error using mex (line 206)
Unable to complete successfully.

Error in compileOpenSimSFunction (line 43)
eval(['mex -v -f msvc90freeopts.bat' include compilerFlags mexcode libs])


I searched the msvc90freeopts.bat in my folders but there isn't. I read on mathworks website that the version R2011b does not use this file.

Then I tried with this command:
mex openSimSFunction.cpp

and the following appears:

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

C:\PROGRA~1\MATLAB\R2011B\BIN\MEX.PL: Error: Compile of 'openSimSFunction.cpp' failed.

Error using mex (line 206)
Unable to complete successfully.


I changed OpenSim path in the script (given that I am using OpenSim2.4.0).

Any suggestion regarding how to fix the problem?
Should I install Matlab 2010?
Why doesn't the compiler find the OpenSim.h?
(I added in the Windows Control Panel the environmental variable PATH =C:\OpenSim2.0.4\bin so that by using CMake and Visual c++ 10 Express I can compile OpenSim cpp examples )

Thank you vary much for your replay and help.
Best Regards,
Paolo

Re: Can't compile openSimSFunction

Posted: Thu Aug 23, 2012 8:05 pm
by glichtwark
I'm not sure you have the right forum Paolo. Are you looking for Jeff Reinbolt's Simulink interface? The m-file you describe is not part of this API examples. Please read the readme file for setting up if you are in the right place.

Re: Can't compile openSimSFunction

Posted: Tue Feb 09, 2016 10:07 am
by janthomas15
Hi Glen,
I am facing the same problem. Can you please send the attachment of the read me file for the setup?

Thanks

Regards,
Jan