diff --git a/builds/msvc/c_local_lat/c_local_lat.vcproj b/builds/msvc/c_local_lat/c_local_lat.vcproj index bacaadb1..a8d9a8df 100644 --- a/builds/msvc/c_local_lat/c_local_lat.vcproj +++ b/builds/msvc/c_local_lat/c_local_lat.vcproj @@ -166,7 +166,7 @@ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" > diff --git a/builds/msvc/c_local_thr/c_local_thr.vcproj b/builds/msvc/c_local_thr/c_local_thr.vcproj index 578de42b..38425cce 100644 --- a/builds/msvc/c_local_thr/c_local_thr.vcproj +++ b/builds/msvc/c_local_thr/c_local_thr.vcproj @@ -166,7 +166,7 @@ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" > diff --git a/builds/msvc/c_remote_lat/c_remote_lat.vcproj b/builds/msvc/c_remote_lat/c_remote_lat.vcproj index 3a4c94f8..5bce7e97 100644 --- a/builds/msvc/c_remote_lat/c_remote_lat.vcproj +++ b/builds/msvc/c_remote_lat/c_remote_lat.vcproj @@ -166,7 +166,7 @@ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" > diff --git a/builds/msvc/c_remote_thr/c_remote_thr.vcproj b/builds/msvc/c_remote_thr/c_remote_thr.vcproj index cd71d7c8..10895491 100644 --- a/builds/msvc/c_remote_thr/c_remote_thr.vcproj +++ b/builds/msvc/c_remote_thr/c_remote_thr.vcproj @@ -166,7 +166,7 @@ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" > diff --git a/builds/msvc/libzmq/libzmq.vcproj b/builds/msvc/libzmq/libzmq.vcproj index 567ee5bc..a525d091 100644 --- a/builds/msvc/libzmq/libzmq.vcproj +++ b/builds/msvc/libzmq/libzmq.vcproj @@ -40,7 +40,7 @@ /> //#endif #define WIN32_LEAN_AND_MEAN -#include // to have IsTextUnicode, MultiByteToWideChar, WideCharToMultiByte to handle unicode files +#include // to have IsTextUnicode, MultiByteToWideChar, WideCharToMultiByte to handle unicode files // to have "MessageBoxA" to display error messages for openFilHelper #endif diff --git a/include/zmq.h b/include/zmq.h index 47d8359e..a7638aa1 100644 --- a/include/zmq.h +++ b/include/zmq.h @@ -30,13 +30,15 @@ extern "C" { #include "winsock2.h" #endif -/* Microsoft Visual Studio uses non-standard way to export/import symbols. */ -#if defined ZMQ_BUILDING_LIBZMQ_WITH_MSVC -#define ZMQ_EXPORT __declspec(dllexport) -#elif defined _MSC_VER -#define ZMQ_EXPORT __declspec(dllimport) +/* Win32 needs special handling for DLL exports */ +#if defined _WIN32 +# if defined DLL_EXPORT +# define ZMQ_EXPORT __declspec(dllexport) +# else +# define ZMQ_EXPORT __declspec(dllimport) +# endif #else -#define ZMQ_EXPORT +# define ZMQ_EXPORT #endif /******************************************************************************/ diff --git a/src/Makefile.am b/src/Makefile.am index ea7ce544..82777945 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -176,7 +176,7 @@ libzmq_la_SOURCES = app_thread.hpp \ zmq_listener.cpp if ON_MINGW -libzmq_la_LDFLAGS = -no-undefined -version-info @LTVER@ @LIBZMQ_EXTRA_LDFLAGS@ +libzmq_la_LDFLAGS = -no-undefined -avoid-version -version-info @LTVER@ @LIBZMQ_EXTRA_LDFLAGS@ else libzmq_la_LDFLAGS = -version-info @LTVER@ @LIBZMQ_EXTRA_LDFLAGS@ endif