-
Notifications
You must be signed in to change notification settings - Fork 197
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
Unable to build in Windows 2/18/2016 #144
Comments
Am I missing something? Or is there something wrong with the copy of zmqpp that I have? EDIT: Retrying with updated repo... |
looks like the stable branch (4.0.8) does need #include <zmq_utils.h> for curve but the libznq's development branch (currently 4.2.0) we don't. We could set defines for this as well but like the defines that caused issues for you previously everything in the 4.2 build is subject to be changed without notice. |
In 4.2 we removed the libsodium dependency (it's optional) and made On Fri, Feb 19, 2016 at 9:55 AM, Ben Gray notifications@github.com wrote:
|
I have no problem with you switching things up with zmq, I am a new user of zmq, I just want to compile these bindings... EDIT: What can I do in the meantime to make the bindings on my end compile-able? |
I have waited a while, is there any progress on fixing this? |
I don't have access to a windows machine so haven't actually looked at this. If it's still the issue with curve and you are compiling against the libzmq dev branch (4.2) you can probably remove the include to solve that. If you have other issues attach the output here and I'll try and work through them. |
Or maybe its because I don't have curve? I just looked at the source for libzmq and the macro for curve isn't defined in MSVC. |
it might be I made a mistake with the way we check for curve, because as far as I understand it it's optional for libzmq and so the fact you don't have it shouldn't stop you compiling. |
I was able to build the latest src successfully with VS2015 today as well as replicate the errors you're seeing @sunkin351. You're getting those build errors because you're missing zmq.lib & |
@benjamg in exploring building on Windows today, there are two bugs with CMakeLists.txt re: Windows builds. The line:
Should be wrapped in a check for the compiler type as those options are not applicable to Microsoft's compilers and throw an error on build:
Second, CMakeLists.txt should add an additional include library for ws2_32 on Windows:
I'm a giant novice with CMake, so please forgive me for winging this with example text rather than submitting a pull request. But, yeah, I was able to build successfully after manually adding ws2_32.lib to the additional library depencies and clearing out the bad flag. Cheers |
Cheers. My CMake is also pretty poor but it's something I need to work on anyway so I'll look into how that works for checking versions. |
By zmq.lib, do you mean libzmq.lib? Also, will try again today with adding ws2_32.lib, just curious, I am building for x64, is this lib for x64? |
@sunkin351 Yes, apologies, libzmq.lib. And yes, ws2_32.lib is the correct name for 64-bit builds too. |
Is it recommended that I link against a DLL or a LIB for libzmq? |
@sunkin351 I can't speak for recommendations, but I can mention that if you look to use static you'll need to additionally define ZMQ_STATIC. I did have that working in my Windows builds but later settled on dynamic, myself. Apologies, I don't have an example to point you to other than the Google. |
Will the compiler automatically consume one dll into the other? |
No, if you build ZMQ as a DLL and ZMQPP as a DLL, you'll need to have both DLLs for your project. |
Is there a way to do it manually? |
Is there a way to link a DLL to a lib? |
Otherwise This issue is solved. Thanks. |
@ianbannerman Is adding the Ws2_32.lib link the fix for the missing netinet/in.h header in zap_request.cpp? |
@markbarks sorry for the delay getting back to you. Linking or not linking against ws3_32.lib will be unrelated to any trouble with netinet/in.h missing. To my knowledge, the linking step takes place well after processing various include header files. Not sure what 'missing' means from the context, though. Can you share the error you're seeing? |
Hi @ianbannerman, thanks for getting back to me. I was unable to compile the zap_request.cpp file because the htobe32 function was not found due to the missing netinet/in.h. I ended up simply including the portable_endian.h header instead, which allowed me to compile and start testing things out. |
I am going to leave a list of unresolved External symbol errors that I encountered while doing a code analysis on the project that would create a *.dll in VS2015...
zmqpp-build-errors.txt
I hope you can get this resolved soon, I love using these bindings... (Note: These errors occur on the latest libzmq from github.)
The text was updated successfully, but these errors were encountered: