-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
undefined reference in mingw when link static library. #3318
Comments
You need to define ZMQ_STATIC when building your application/library. |
@o-u-p Were you able to resolve your build problem? |
@sigiesec Hi , even I am getting the same issue. I didn't understand "define ZMQ_STATIC". Do you mean I need to set something like |
@sigiesec Also I notice that running
It shows ZMQ_STATIC not used so am I doing something wrong here? |
ZMQ_STATIC must be defined when calling the compiler, not cmake. So within cmake, add_definitions or target_compile_definitions would need to be called. I am not familiar with building czmq (this is more a question towards the czmq repo), so I don't know how the czmq can be configured such that it defines ZMQ_STATIC. |
Ok thanks I was able to get my work done using msi installer .. |
This issue has been automatically marked as stale because it has not had activity for 365 days. It will be closed if no further activity occurs within 56 days. Thank you for your contributions. |
Please use this template for reporting suspected bugs or requests for help.
Issue description
I'm trying to compile a static libzmq.a in windows using mingw, I tried both the configure and Makefile.mingw32 file and got libzmq.a, but neither woked, here is the output:
--
Environment
Minimal test code / Steps to reproduce the issue
What's the actual result? (include assertion message & call stack if applicable)
undefiend reference
What's the expected result?
should export correct libzmq.a
The text was updated successfully, but these errors were encountered: