[zeromq-dev] Using ZeroMQ in VS2012 C++

Riskybiz riskybizLive at live.com
Sun Jul 14 23:42:33 CEST 2013


I’m trying to build the ‘Hello World’ server example from the ZeroMQ guide
documentation using Visual Studio 2012 C++.

 

I’m having trouble getting the project to link properly.  The zmq.h header
file is found (note: not zmq.hpp as in the example code) but the particular
zeromq commands remain underlined in red by intellisense.  Something is not
being recognised properly.

 

Have tried both the Windows MSI install package and also building the binary
code directly on my machine neither approach made any difference.

 

I see that Shon Love recommended the following a few days ago on this
mailing list:

 

  1. Add the path to 0mq's 'include' folder to your project's include path.

  2. Add the path to 0mq's 'lib' folder to your project's additional library
path.

  3. Add the libzmq<whatever>.lib file to the list of additional libraries
your exe will link against.

  4. Make sure the libzmq<whatever>.dll file is in the PATH for your
application's exe when it is run.  For debugging, I often copy the
appropriate .dll file into the build folder for the application, but
installing the libzmq*.dll files into the normal execution path works, too.

 

  Hope you can make sense of any of that :)

 

Thanks,

Shon

 

Using my newly built ZeroMQ binaries I’ve got my project properties set like
so:

 

1.       C/C++->General->Additional Include Directories :
C:\zeromq-3.2.3\include      

 

2.       Linker->General->Additional Library Directories :
C:\zeromq-3.2.3\lib\Win32

 

3.       Linker->Input->Additional Dependencies:
C:\zeromq-3.2.3\lib\Win32\libzmq.lib

 

4.       Placed the libzmq.dll into the project’s release folder.

 

Does anyone know what could be wrong here?? João Pereira, did you get your
ZeroMQ project to build on Visual Studio 2012?  If so how did you do it?

 

With thanks,

 

Riskybiz

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20130714/e230e2b1/attachment.htm>


More information about the zeromq-dev mailing list