mz-automation / libiec61850

Official repository for libIEC61850, the open-source library for the IEC 61850 protocols
http://libiec61850.com/libiec61850
GNU General Public License v3.0
828 stars 444 forks source link

MinGW64 doesn't output libiec61850.dll - only static libiec61850.a is produced --> Solved #493

Closed joachim-heck closed 5 months ago

joachim-heck commented 5 months ago

I'm currently struggeling to get the library build for my windows machine using: make TARGET=WIN64

the make process runs perfectly but after all, there is only a libiec61850.a generated in the build_win32 folder and not the dynamically linked version. I tryed this on WSL2, an Ubuntu machine but also on Windows using MinGW64 and MSYS2.

Do you have any hint for me?

On the WSL2 and Linux System, the examples do run perfectly and the library is working as expected... but unfortunately I'mnot able to get the DLL to use it in my .net Environment.

Many thanks and regards, Joachim

joachim-heck commented 5 months ago

So, finally I have my libiec61850.dll build on my Ubuntu WSL2 machine. I want to share the steps with everyone who might struggle with it.

Steps to build on Ubuntu WSL2 libiec61850.dll for Windows

Errors related to missing i586-mingw32msvc Note the documented 'make TARGET=WIN32will fail with errors due to the minGW64 doesn't includei586-mingw32msvc. To make this run you have to edit themake/target_system.mk' file and fix the TOOLCHAIN PREFIX in line 10 from MINGW_TOOLCHAIN_PREFIX=i586-mingw32msvc- to MINGW_TOOLCHAIN_PREFIX=i686-w64-mingw32-