martinling / libserialport

Unofficial personal repository for libserialport - see git://sigrok.org/libserialport for official repo
http://sigrok.org/wiki/Libserialport
GNU Lesser General Public License v3.0
65 stars 34 forks source link

Fix windows build #3

Closed mbt closed 9 years ago

mbt commented 10 years ago

When building for Windows (using MingW on Linux), the build fails for three reasons:

These commits allow the mingw-compiled Windows build to work again.

martinling commented 10 years ago

Hi Michael, thanks for sending this. I've made some comments on the individual commits with some requested changes, please make these and update the pull request if you can.

mbt commented 10 years ago

Will do in just a few minutes. Thanks for the feedback.

mbt commented 10 years ago

OK, just pushed new commits. The net impact is cleaner than the commit history; if desired, I can simply cancel this pull request and create a new one with a cleaner commit history. Otherwise, I think I addressed everything. Let me know!

uwehermann commented 10 years ago

Hi, thanks for the fixes! I've merged this upstream into the mainline libserialport repo at http://sigrok.org/gitweb/?p=libserialport.git (I've stashed together some of the commits for nicer history indeed).

The DEBUG_FMT fix was already included in mainline so that got dropped, the rest should be in now.

The -no-undefined is indeed needed for shared builds on Windows (DLLs and Import-DLLs), that's a libtool design choice, I think. It won't build DLLs without -no-undefined at all. I've verified that the current state now builds both for shared and static builds (Linux and Windows).

Cheers!