[zeromq-dev] Qt C++ Windows

Stuart Dootson stuart.dootson at gmail.com
Wed Dec 14 09:28:31 CET 2016


On 13 December 2016 at 15:41, Eric Gendron <conceptid at gmail.com> wrote:

> Thanks for trying.
>
> I have the same error: "cannot find -llibzmq_d" and if I remove the _d
> part, same thing... cannot find -llibzmq
>
> error: ld returned 1 exist status    collect2.exe
>
>
> My .pro:
>
> QT += core
>
> QT -= gui
>
>
> CONFIG += c++11
>
>
> TARGET = hello
>
> CONFIG += console
>
> CONFIG -= app_bundle
>
>
> TEMPLATE = app
>
>
> INCLUDEPATH += C:/zmq/include
>
> INCLUDEPATH += C:/zmq/src
>
> INCLUDEPATH += C:/zmq/bin
>
>
> CONFIG(debug, debug|release) {
>
>
>     LIBS += -LC:/zmq/lib -llibzmq_d
>
> }
>
>
> CONFIG(release, debug|release) {
>
>
>     LIBS += -LC:/zmq/lib -llibzmq
>
> }
>
>
> SOURCES += main.cpp \
>
>     guid.cpp
>
>
> HEADERS += \
>
>     guid.h \
>
>
>
> The folder with zmq install:
>
> C:\zmq
> with bin, doc, include, lib, src... subfolders.
>
> I copied all the dll in c:\zmq\lib and I have:
> I also copied all the dll in the debug folder where the app execute...
>
> libzmq-v90-mt-4_0_4.lib (and .dll and .pdb)
> libzmq-v90-mt-gd-4_0_4.lib
> libzmq-v100-mt-gd_4_0_4.lib
> etc... for v110 and v120
>

So, the names of the lib files that you do have don't match the name you've
used in the .pro file? That's a problem...

But a bigger problem is that you have DLLs and LIBs built for Visual Studio
(that's what the v90/100/110, -mt- and -gd- imply). They aren't going to
work well with your application written using mingw's g++ for various
reasons (different name mangling, different C runtimes, to name two), so
you're going to need a 0mq built with mingw (see
http://zeromq.org/docs:windows-installations#toc2).

Stuart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20161214/841421c7/attachment.htm>


More information about the zeromq-dev mailing list