[zeromq-dev] Code organization

Martin Sustrik sustrik at 250bpm.com
Tue Feb 16 08:16:15 CET 2010


Gonzalo,

> I saw a couple of ugly includes like these in zmq_streamer.cpp:
> 
>   #include "../../bindings/cpp/zmq.hpp"
>   #include "../../foreign/xmlParser/xmlParser.cpp"

This is because the build on zmq_streamer is done in the source tree 
(before the header files are installed).

> I would like to suggest adding an "include namespace" so that file
> inclusion in zmq can be done like this:
> 
>   #include <zmq/zmq.h>
>   #include <zmq/zmq.hpp>
> 
> That means under Unix you would have these files under /usr/include/zmq,
> which I think provides a nice level of isolation. You could even have
> subdirectories in there:
> 
> #include <zmq/cpp/zmq.hpp> // C++ binding ==>
> /usr/include/zmq/cpp/zmq.hpp
> 
> This way, the distribution tarball could have the include files under a
> single zmq directory, and one could compile directly against an
> uninstalled tarball (using appropriate -I flags) or against an installed
> one.

Just do sudo make install after you build the thing and header files 
will get copied to the specified deployment directory (/usr/local by 
default IIRC, however, you can change that to /usr using --prefix option 
with ./configure).

> A question: is anybody working on porting zmq to cygwin?

Several people have asked this question, but AFAIK nobody's really 
working at it at the moment.

Martin



More information about the zeromq-dev mailing list