Closed Smasherr closed 7 years ago
What's missing is the ZMQPP_EXPORT attribute, eg:
class proxy
should probably be
class ZMQPP_EXPORT proxy
https://github.com/zeromq/zmqpp/blob/develop/src/zmqpp/proxy.hpp#L27
Since it affects you, could you please test it and send a PR if this works for you? Thanks!
I already tried it and I should have mentioned that, sorry. With ZMQPP_EXPORT
i get another error: undefined reference to '__imp__ZN5zmqpp5proxyC1ERNS_6socketES2_'
. This is because ZMQPP_EXPORT
evaluates to __declspec(dllimport)
for me for some reason, my IDE reveals me the following view on zmqpp_export.h, if I request a declaration of this ZMQPP_EXPORT
:
all classes use that macro, not sure what's happening with your IDE, I'm not a windows expert sorry, maybe someone else can help
The IDE only shows that zmqpp_EXPORTS
is not currently defined in my environment. I realized this is irrelevant. zmqpp_EXPORTS
should be set during compile time. I enabled the verbosity of makefile to check if that option is set during compilation of proxy.cpp
. It was the case (see line 473). To my surprise adding ZMQPP_EXPORT
to proxy
class and repeated rebuilding of ZMQPP made my code link successfully this time.
So I'll send a PR, thanks for your support!
I am trying to create a proxy object in my code:
That linking error message appears:
undefined reference to 'zmqpp::proxy::proxy(zmqpp::socket&, zmqpp::socket&)'
If I change the proxy class definition as following:
and rebuild zmpqq, my binary gets linked well.
I am using the latest sources of libzmq and zmpqq pulled from git on msys2 with mingw-w64, cmake 3.8 and gcc 6.3.0.