[zeromq-dev] Qt C++ Windows

Eric Gendron conceptid at gmail.com
Mon Dec 12 17:08:27 CET 2016


Thanks for answer.  I have already that in my .pro

INCLUDEPATH += C:/zmq/include

INCLUDEPATH += C:/zmq/src

INCLUDEPATH += C:/zmq/bin


win32: LIBS += -LC:/zmq/lib -lzmq


On Mon, Dec 12, 2016 at 10:16 AM, Stuart Dootson <stuart.dootson at gmail.com>
wrote:

> On 12 December 2016 at 12:30, Eric Gendron <conceptid at gmail.com> wrote:
>
>> I used the windows install for 0mq.
>> I try to compile an hello world code...
>> I use Qt c++ with Qt creator and mingw compiler of course.
>>
>> I even tried recompile 0mq with the python script or something like that
>> on the site... and make give me errors.
>>
>> I do all in 32 bits to be sure.
>>
>> My laptop is windows 7 pro 64 bits.
>>
>> I can compile my code with clang++ in ubuntu linux or freebsd with binary
>> 0mq.
>>
>> I can compile in Qt creator in ubuntu with g++ too and binary for 0mq.
>>
>>
>> On Dec 12, 2016 7:21 AM, "Oleksii Zamiatin" <ozamiatin at mirantis.com>
>> wrote:
>>
>> Hi,
>> Which compiler do you use on Windows and how do you install zmq (build
>> from sources)?
>> For MSVC the name of the library will be zmq.lib so -lzmq extracted to
>> libzmq.a will point to non existent library.
>> -lzmq should work for MinGW, but I’d double check on pathes configuration.
>>
>> > On Dec 12, 2016, at 14:14, Eric Gendron <conceptid at gmail.com> wrote:
>> >
>> >
>> > Hi
>> >
>> > I succeed to use 0mq in linux and freebsd with clang++
>> >
>> > Now I would like to compile the code in Qt C++ windows and I didn't
>> succeed to link with the 0mq library or even compile it.
>> >
>> > I would like to know how to do it.
>> >
>> > Qt can't find -lzmq in LIBS command in .pro file.
>> >
>> > I tried to install 0mq 4.2 binaries windows 32 bits and copy zmq.hpp I
>> found in git in the same folder than .h
>> >
>> > Also I have a message that zmq_msg_gets doesn't exist.
>> >
>> > Really not easy to make it work.
>> >
>> > Thanks.
>> >
>>
>>
> Eric - you're going to have to add some extra definitions in the pro file
> for building on win32 - basically, you'll need to tell qmake where to find
> the 0mq include and library paths. I'd use something like:
>
> win32 {
>
>    INCLUDEPATH += *<path to your 0mq's include directory>*
>
>    LIBS += -lzmq -L*<path to your 0mq's lib directory>*
>
> }
>
>
> These qmake variables are documented at http://doc.qt.io/qt-4.8/
> qmake-variable-reference.html#includepath and http://doc.qt.io/qt-4.8/
> qmake-variable-reference.html#libs respectively.
>
> Hope that helps
>
> Stuart Dootson
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20161212/3503a348/attachment.htm>


More information about the zeromq-dev mailing list