jonnydee / nzmqt

nzmqt - A lightweight C++ Qt binding for ZeroMQ
Other
199 stars 72 forks source link

project setup on mac #54

Open sherifomran opened 4 years ago

sherifomran commented 4 years ago

i downloaded the repository and installed zmq using brew install zmq

i still can not compile the static library is there any other step that i should do?

zmg.h file is missing?

sherifomran commented 4 years ago

i found the first part using brew install zmq the header is installed into /usr/local/include so i opened nzmqt_test.pro and changed line 64 to /usr/local/include but then i get library not found for -lzmq

when i open the nzmqt_staticlib.pro and compile it, it compiles but the output is moc_nzmqt.cpp, moc_nzmqt.o, moc_predefs.h and nzmqt.o, i expect .a or .dynlib or .lib please help

sherifomran commented 4 years ago

I added the following lines and now nzmqt_test compiles and runs

macx: LIBS += -L$$PWD/../../../../../usr/local/Cellar/zeromq/4.3.2/lib/ -lzmq

INCLUDEPATH += $$PWD/../../../../../usr/local/Cellar/zeromq/4.3.2/include
DEPENDPATH += $$PWD/../../../../../usr/local/Cellar/zeromq/4.3.2/include

macx: PRE_TARGETDEPS += $$PWD/../../../../../usr/local/Cellar/zeromq/4.3.2/lib/libzmq.a
sherifomran commented 4 years ago

i found also that the library is created in the bin folder when i compile nzmqt_staticlib where also the nzmqt_test is also placed

DESTDIR = $$_PRO_FILEPWD/../bin