Hi,
I was trying to build the long jump project from:
https://simtk.org/projects/predictive_slj/
I downloaded the files and followed the instructions from the following page to build the project:
https://simtk-confluence.stanford.edu:8 ... d=29165309
After generating the codes in Cmake and opening the solution in visual C++ 2019, I tried to build ALL_BUILD but I faced with a long list of errors mostly stating that some libraries could not be found. For example,
E1696 cannot open source file "simbody/internal/common.h" Executables - predictive_SLJ_nominal C:\opensim-core\OpenSim\Actuators\Millard2012EquilibriumMuscle.h 26
E1696 cannot open source file "SimTKcommon/internal/Xml.h" Executables - predictive_SLJ_nominal C:\opensim-core\OpenSim\Common\AbstractProperty.h 32
E1696 cannot open source file "SimTKcommon/internal/Stage.h" Executables - predictive_SLJ_nominal C:\opensim-core\OpenSim\Common\ComponentOutput.h 40
The error list was very long but these are just a few examples. I tried to regenerate the solution in Cmake and add some entries to define paths specifying the opesim source directory and simbody in the sdk sub-folder within the opensim installation directory but none of these changed anything. I even tried to build simbody from source but that did not help either and I faced with a long list of errors there too (somewhat similar to what I stated above).
For your information, I have installed opensim 4.1 on windows 10.
What can be the problem?
Best,
Aff
long jump dynamic optimization
- Afshin Samani
- Posts: 6
- Joined: Thu Jun 04, 2020 3:21 am
- Carmichael Ong
- Posts: 393
- Joined: Fri Feb 24, 2012 11:50 am
Re: long jump dynamic optimization
The project was built with OpenSim 3.2, so likely some of the issues are due to changes in the API since then. It was also published in 2015, so there could be issues using VS2019. The code would need to be updated to work both with VS2019 and OpenSim 4.1
- Afshin Samani
- Posts: 6
- Joined: Thu Jun 04, 2020 3:21 am
Re: long jump dynamic optimization
Hi, thanks for your reply.
I have now installed opensim 3.2 and visual studio 2015 but I still face a long list of errors. As far as I can see and understand the windows path includes the opensim2.3/bin and other path information seem to be correct at least to the extent that I understand how it should be. For your information, I followed the instructions on the page
https://simtk-confluence.stanford.edu:8 ... d=29165309
and the "tug of war" example seems to be functioning as expected. I mean I get the exe file and I see the message "OpenSim example completed successfully." so I believe I follow a correct procedure for doing this.
Best,
Afshin
some examples of the errors that I get are like the following:
Error C2883 'std::signbit': function declaration conflicts with 'signbit' introduced by using-declaration Libraries - sljCommon c:\opensim 3.2\sdk\include\simtk\include\SimTKcommon\internal\common.h 271
Error C2084 function 'bool signbit(float) throw()' already has a body Libraries - sljCommon c:\opensim 3.2\sdk\include\simtk\include\SimTKcommon\internal\common.h 271
Error C2264 'signbit': error in function definition or declaration; function not called Libraries - sljCommon c:\opensim 3.2\sdk\include\simtk\include\SimTKcommon\Scalar.h 293
I have now installed opensim 3.2 and visual studio 2015 but I still face a long list of errors. As far as I can see and understand the windows path includes the opensim2.3/bin and other path information seem to be correct at least to the extent that I understand how it should be. For your information, I followed the instructions on the page
https://simtk-confluence.stanford.edu:8 ... d=29165309
and the "tug of war" example seems to be functioning as expected. I mean I get the exe file and I see the message "OpenSim example completed successfully." so I believe I follow a correct procedure for doing this.
Best,
Afshin
some examples of the errors that I get are like the following:
Error C2883 'std::signbit': function declaration conflicts with 'signbit' introduced by using-declaration Libraries - sljCommon c:\opensim 3.2\sdk\include\simtk\include\SimTKcommon\internal\common.h 271
Error C2084 function 'bool signbit(float) throw()' already has a body Libraries - sljCommon c:\opensim 3.2\sdk\include\simtk\include\SimTKcommon\internal\common.h 271
Error C2264 'signbit': error in function definition or declaration; function not called Libraries - sljCommon c:\opensim 3.2\sdk\include\simtk\include\SimTKcommon\Scalar.h 293
- Carmichael Ong
- Posts: 393
- Joined: Fri Feb 24, 2012 11:50 am
Re: long jump dynamic optimization
Sorry to be a little unclear. I wish I had left better documentation on the project page. My guess is that it originally used VS2012, as it was unlikely that VS2015 was released while the simulations were being run (which would have been before the published year of 2015). Since your environment is working though, it could be faster to fix the C++ errors with 2015. Searching for the error code on google seems to give good ideas about how to fix these errors (see for instance: https://docs.microsoft.com/en-us/cpp/er ... ew=vs-2019)
- Afshin Samani
- Posts: 6
- Joined: Thu Jun 04, 2020 3:21 am
Re: long jump dynamic optimization
Thanks again for your input.
Unfortunately, the list of errors is a very long list of about 300 entries so going through the errors one by one would require quite some time, plus that I am not a very advanced VS user.
I was hoping that there is a common mistake that people usually make and I could simply fix that but apparently I have to find the issue in my case separately.
By the was I also tried to install VS2012 and use that in Cmake but it gave me an error that the cmake compiler could not be found. I did not have this issue with VS2015 or VS2019.
Best,
Afshin
Unfortunately, the list of errors is a very long list of about 300 entries so going through the errors one by one would require quite some time, plus that I am not a very advanced VS user.
I was hoping that there is a common mistake that people usually make and I could simply fix that but apparently I have to find the issue in my case separately.
By the was I also tried to install VS2012 and use that in Cmake but it gave me an error that the cmake compiler could not be found. I did not have this issue with VS2015 or VS2019.
Best,
Afshin