Hello,
Thank you to the all moderators and contributed of this forum who are giving their valuable time here to help others. I learned a lot of things from here.
I am trying to learn OpenSim API. I have installed it using the Cmake and try to build the Examplemain code. When I was trying to build the code in Cmake, I faced this warning:
I ignored the warning and moved forward. When I run the built code by "start without debugging " in visual studio 2019 , I am getting error message about missing several dll files like osimActuators.dll, osimAnalyses.dll,osim.Common.dll etc.
A screenshot of my CMake setting is given here.
I got a solution in internet, that is copy-paste all the missing dll files in C/windows/system32. But, I think I am missing something. This should not be the way.
If you have any idea about the reasons of the missing files, please share. That will help me.
Thanks,
Rahid
Eamplemain dll files missing
- Rahid Zaman
- Posts: 31
- Joined: Fri Apr 21, 2017 3:43 am
- Dimitar Stanev
- Posts: 1096
- Joined: Fri Jan 31, 2014 5:14 am
Re: Eamplemain dll files missing
Hi Rahid,
You should append OpenSim's bin directory (e.g., C:\OpenSim 4.1\bin) into the system PATH variable. For convenience, you could use rapid environmental editor.
You should append OpenSim's bin directory (e.g., C:\OpenSim 4.1\bin) into the system PATH variable. For convenience, you could use rapid environmental editor.
- Rahid Zaman
- Posts: 31
- Joined: Fri Apr 21, 2017 3:43 am
Re: Eamplemain dll files missing
Hello Mr. Dimitar for you reply.
I installed OpenSim API according to this guidelines: https://github.com/opensim-org/opensim-core
So, after installaing the API, I have to download the OpenSim 4.1 separately, and set the environment variable for that directory?
Do you mean rapid environmental editor as OpenSim GUI or anything else? I used OpenSim GUI before, but now I need to integrate OpenSim with my code. That's why I thought learning how to use OpenSim API would be a useful thing for me.
Thanks,
Rahid
I installed OpenSim API according to this guidelines: https://github.com/opensim-org/opensim-core
So, after installaing the API, I have to download the OpenSim 4.1 separately, and set the environment variable for that directory?
Do you mean rapid environmental editor as OpenSim GUI or anything else? I used OpenSim GUI before, but now I need to integrate OpenSim with my code. That's why I thought learning how to use OpenSim API would be a useful thing for me.
Thanks,
Rahid
- Dimitar Stanev
- Posts: 1096
- Joined: Fri Jan 31, 2014 5:14 am
Re: Eamplemain dll files missing
Dynamic libraries (.dll) should be located by the application at runtime. In order to locate those files you should append the absolute path to the environmental variable PATH of the operating system, in case that they are not placed in system-wide directories like system32. You can do this through Windows or use a very useful application called rapid environmental editor.
You should be careful which directory you are appending in case that you use multiple versions of OpenSim (e.g., opensim-core and OpenSim 4.1). If CMake points to opensim-core, then you should locate the bin folder where the .dll files are installed when you built opensim-core. Otherwise, you can do the same with OpenSim 4.1. Keep in mind that you might run into errors if upon configuration of the CMake OpenSim tutorial, the OpenSim_DIR or OPENSIM_HOME variables point to C:\OpenSim 4.1\sdk. .. but the bin folder that you have appended to PATH points to something else.
I suggest that you familiarize yourself with the C++ compilation, static and dynamic linking and CMake. Also, check what the PATH variable is and how to modify it.
https://cmake.org/cmake/help/git-stage/ ... index.html
You should be careful which directory you are appending in case that you use multiple versions of OpenSim (e.g., opensim-core and OpenSim 4.1). If CMake points to opensim-core, then you should locate the bin folder where the .dll files are installed when you built opensim-core. Otherwise, you can do the same with OpenSim 4.1. Keep in mind that you might run into errors if upon configuration of the CMake OpenSim tutorial, the OpenSim_DIR or OPENSIM_HOME variables point to C:\OpenSim 4.1\sdk. .. but the bin folder that you have appended to PATH points to something else.
I suggest that you familiarize yourself with the C++ compilation, static and dynamic linking and CMake. Also, check what the PATH variable is and how to modify it.
https://cmake.org/cmake/help/git-stage/ ... index.html
- Rahid Zaman
- Posts: 31
- Joined: Fri Apr 21, 2017 3:43 am
Re: Eamplemain dll files missing
Mr. Dimitar,
Those are really useful info for me. I downloaded the OpenSim 4.1 and showed the OpenSim 4.1/Bin in the environment path. Now, it is working. Not sure, why it was not working when I showed the path to OpenSim-core/Bin.
Yes, I need to learn more about the C++ compilation and Cmake. I will go through the link.
Thank you for your time and help.
Those are really useful info for me. I downloaded the OpenSim 4.1 and showed the OpenSim 4.1/Bin in the environment path. Now, it is working. Not sure, why it was not working when I showed the path to OpenSim-core/Bin.
Yes, I need to learn more about the C++ compilation and Cmake. I will go through the link.
Thank you for your time and help.