-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix the locations and names of compiled libraries #66
Comments
I am not sure I get the point. I thought I had taken care of this in the CMake script? What is going wrong? |
There are some issues with the places where the compiled libraries are put in the Resources/Library directory. Regarding Windows, both .dll and .lib are placed in win64/vs2007 etc, and there is one directory for each version of visual studio. This was necessary when compiling externalmedialib as a static library, because different versions of VS are not backwards compatible at the linker level. In principle, this should no longer be necessary now that we have DLLs. However, for some reason (maybe you understand why) Dymola still uses a very small statically linked .lib library, so for Dymola under Windows keeping them in compiler-specific directories looks good. On the other hand, OpenModelica doesn't need that statically linked library, and it just looks for the dll either in win64 or win32; BTW it doesn't use VS by default, it rather uses clang from mingw. So, for Windows it is necessary to also copy the ExternalMediaLib.dll 32-bit DLL to win32 and the 64-bit DLL to win64. I guess you can use the ones compiled with the latest VS compiler. There is also some problem with library locations on Linux, @fedetftpolimi can you please remind @jowr where the .so libraries should be copied, so that they work both in Dymola and OpenModelica? |
I checked on Linux and there are no problems The CMake build target installs libraries in Resources/Library/linux64 and both OpenModelica and Dymola can find them there. Please don't modify the Linux install target further. I think only Windows remains an issue, as I remember @casella had to move the .dll to another directory to make the library work, I don't remember if the issue was with OpenModelica or Dymola though. |
I found and fixed a few likely copy-paste bugs in the CMake, that explain why
I also modified the Windows install target to remove the compiler directory and install dlls directly in the win32/win64 directory. @casella is testing this, if it works this issue can be closed. |
Today me and @casella checked, and the current build in the CI works on both Windows (64bit, vs2017 is the only combination we tested) and Linux, with OpenModelica and Dymola, so I'm closing this. |
Fix the locations and names of compiled libraries in Resources/Library so that they are found by Dymola and OpenModelica both on Windows and Linux.
The text was updated successfully, but these errors were encountered: