Closed GreroDe closed 2 years ago
Hi, generally, the application loading the FMU-DLL needs to find all referenced libraries (also those referenced by the DLL itself). So if you compiled the FMU with Visual Studio, then you need to place the VC runtime libraries into the exe-directory or adjust your PATH variable accordingly.
If you compile the FMU with MinGW, the resulting FMU-DLL should no longer reference the VC runtimes, but rather the GCC/MingW runtime DLLs. Similarly, these need to be present to the application loading the DLL.
Thanks @ghorwin for the information. I already added the MinGW path in the environment variables, generated the dll file and added it to the .fmu file. It still doesn't work. I wanted to try adding the runtime libraries in the exe directory. Do you know what the libraries are or maybe if you can give me a tip on how to do it. Thanks in advance.
All missing DLLs must be located and be in the PATH in the correct versions. This is not an FMUCodeGenerator issue, but rather a general Windows dll locator problem. Maybe your PATH variable contains directories with other runtime libs of different versions? Otherwise, please post the error messages you get!
Thank you It works.
Hi everyone!
I am new in the area and I was interacting a little bit the source code using Eclipse IDE to generate FMUs. The exported DLL file works fine when I am using Microsoft Visual C++ compiler, but when I switched to MinGW compiler the .dll file does not work. I was checking the exported DLL file with Dependency Walker and I saw that the file has problems with Kernell32.dll and MSVCRT.dll. Is there any reason why it can't work with the MinGW compiler and if possible, what should I do to link the necessary libraries with the code to generate the DLL file?
Thank you all for the help.