modelon-community / fmi-library

C library for importing FMUs
Other
116 stars 34 forks source link

It cannot load DLL when Chinese characters are in the Windows decompression path. #153

Open weixinhum2023 opened 5 days ago

weixinhum2023 commented 5 days ago

Description error Thanks to the author for his hard work, I recently found a small problem when using this library. When I use the compiled lib to load the fmu's dll file on Windows, if the path of the dll file contains Chinese characters, it cannot be loaded correctly.

Solution Locate the file "...\fmi-library-3.0a4\src\Util\src\JM\jm_portability.c" and modify the jm_portability_load_dll_handle_with_flag function as follows to solve the problem.

Version 3.0.a4 Windows VS2022

weixinhum2023 commented 5 days ago

I'm sorry, but this report concerns the same issue as #91, and I haven't seen it before.