mbroadst / qamqp

AMQP 0.9.1 implementation for Qt
Other
151 stars 127 forks source link

Only src project compiles #40

Closed willpnw closed 7 years ago

willpnw commented 8 years ago

Perhaps I'm doing this wrong, but when I try to compile the hello worl project, I get the following error: 16:34:09: Running steps for project qamqp... 16:34:09: Starting: "/usr/bin/make" clean rm -f main.moc rm -f main.o rm -f _~ core .core 16:34:09: The process "/usr/bin/make" exited normally. 16:34:09: Starting: "/usr/lib/x86_64-linux-gnu/qt4/bin/qmake" /home/will/Rail/rail/qamqp/tutorials/helloworld/receive/receive.pro -r -spec linux-g++-64 CONFIG+=debug 16:34:09: The process "/usr/lib/x86_64-linux-gnu/qt4/bin/qmake" exited normally. 16:34:09: Starting: "/usr/bin/make" /usr/lib/x86_64-linux-gnu/qt4/bin/moc -DQAMQP_SHARED -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I../../../../qamqp/tutorials/helloworld/receive -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I../../../../qamqp/src -I. -I../../../../qamqp/tutorials/helloworld/receive -I. ../../../../qamqp/tutorials/helloworld/receive/main.cpp -o main.moc g++ -c -m64 -pipe -g -Wall -W -D_REENTRANT -DQAMQP_SHARED -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I../../../../qamqp/tutorials/helloworld/receive -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I../../../../qamqp/src -I. -I../../../../qamqp/tutorials/helloworld/receive -I. -o main.o ../../../../qamqp/tutorials/helloworld/receive/main.cpp g++ -m64 -o receive main.o -L/usr/lib/x86_64-linux-gnu -L../../../src -lqamqpd -lQtGui -lQtNetwork -lQtCore -lpthread _/usr/bin/ld: cannot find -lqamqpd Makefile:103: recipe for target 'receive' failed collect2: error: ld returned 1 exit status make: * [receive] Error 1 16:34:09: The process "/usr/bin/make" exited with code 2. Error while building/deploying project qamqp (kit: Desktop) When executing step "Make" 16:34:09: Elapsed time: 00:00.

When building the root project I see the following error: g++ -c -m64 -pipe -g -Wall -W -D_REENTRANT -fPIC -DQAMQP_SHARED -DQAMQP_BUILD -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I../../qamqp/src -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4 -I../../qamqp/src -I. -I. -o moc_qamqpexchange.o moc_qamqpexchange.cpp rm -f libqamqp.so.0.4.0 libqamqp.so libqamqp.so.0 libqamqp.so.0.4 g++ -m64 -shared -Wl,-soname,libqamqp.so.0 -o libqamqp.so.0.4.0 qamqpauthenticator.o qamqpchannel.o qamqpchannelhash.o qamqpclient.o qamqpexchange.o qamqpframe.o qamqpmessage.o qamqpqueue.o qamqptable.o moc_qamqpexchange.o -L/usr/lib/x8664-linux-gnu -lQtNetwork -lQtCore -lpthread
ln -s libqamqp.so.0.4.0 libqamqp.so ln -s libqamqp.so.0.4.0 libqamqp.so.0 ln -s libqamqp.so.0.4.0 libqamqp.so.0.4 { test -z "" || cd ""; } && test $(gdb --version | sed -e 's,[^0-9][^0-9]
([0-9]).([0-9])._,\1\2,;q') -gt 72 && gdb --nx --batch --quiet -ex 'set confirm off' -ex "save gdb-index ." -ex quit 'libqamqp.so.0.4.0' && test -f libqamqp.so.0.4.0.gdb-index && objcopy --add-section '.gdb_index=libqamqp.so.0.4.0.gdb-index' --set-section-flags '.gdb_index=readonly' 'libqamqp.so.0.4.0' 'libqamqp.so.0.4.0' && rm -f libqamqp.so.0.4.0.gdb-index || true make[1]: Leaving directory '/home/will/Rail/rail/build-qamqp-Desktop-Debug/src' cd tests/ && /usr/bin/make -f Makefile make[1]: Entering directory '/home/will/Rail/rail/build-qamqp-Desktop-Debug/tests' cd auto/ && /usr/bin/make -f Makefile make[2]: Entering directory '/home/will/Rail/rail/build-qamqp-Desktop-Debug/tests/auto' cd qamqpclient/ && /usr/bin/make -f Makefile make[3]: Entering directory '/home/will/Rail/rail/build-qamqp-Desktop-Debug/tests/auto/qamqpclient' /usr/lib/x86_64-linux-gnu/qt4/bin/moc -DQAMQP_SHARED -DQT_TESTLIB_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I../../../../qamqp/tests/auto/qamqpclient -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtTest -I/usr/include/qt4 -I../../../../qamqp/src -I../../../../qamqp/tests/common -I/home/will/Rail/rail/build-qamqp-Desktop-Debug/tests/auto/qamqpclient/. -I../../../../qamqp/tests/auto/qamqpclient -I. ../../../../qamqp/tests/auto/qamqpclient/tst_qamqpclient.cpp -o tst_qamqpclient.moc g++ -c -m64 -pipe -g -Wall -W -D_REENTRANT -DQAMQP_SHARED -DQT_TESTLIB_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I../../../../qamqp/tests/auto/qamqpclient -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtTest -I/usr/include/qt4 -I../../../../qamqp/src -I../../../../qamqp/tests/common -I/home/will/Rail/rail/build-qamqp-Desktop-Debug/tests/auto/qamqpclient/. -I../../../../qamqp/tests/auto/qamqpclient -I. -o tst_qamqpclient.o ../../../../qamqp/tests/auto/qamqpclient/tst_qamqpclient.cpp /usr/lib/x86_64-linux-gnu/qt4/bin/rcc -name certs ../../../../qamqp/tests/auto/qamqpclient/certs.qrc -o qrc_certs.cpp g++ -c -m64 -pipe -g -Wall -W -D_REENTRANT -DQAMQP_SHARED -DQT_TESTLIB_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I../../../../qamqp/tests/auto/qamqpclient -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtTest -I/usr/include/qt4 -I../../../../qamqp/src -I../../../../qamqp/tests/common -I/home/will/Rail/rail/build-qamqp-Desktop-Debug/tests/auto/qamqpclient/. -I../../../../qamqp/tests/auto/qamqpclient -I. -o qrc_certs.o qrc_certs.cpp g++ -m64 -Wl,-rpath,/home/will/Rail/rail/build-qamqp-Desktop-Debug/src -o tst_qamqpclient tst_qamqpclient.o qrc_certs.o -L/usr/lib/x86_64-linux-gnu -L../../../src -lqamqpd -lQtTest -lQtNetwork -lQtCore -lpthread /usr/bin/ld: cannot find -lqamqpd

The src project seems to compile fine and does not complain.

Is there some issue with my setup or some dependency I am missing? Given all the projects and sub-projects contained here, a simple quick start guide would go a long way.

mbroadst commented 8 years ago

@wilpatterson hey, the helloworld is actually built as part of the whole project. If you follow these steps you can run either the send or receive examples there:

git clone https://github.com/mbroadst/qamqp
cd qamqp
mkdir build && cd build
qmake ..
make
LD_LIBRARY_PATH=./src ./tutorials/helloworld/receive/receive

The tests are rpath'd to the library, but the tutorials are not hence the need to specify the library location.

droidsyer commented 8 years ago

Hi @wilpatterson , I think that is very useful, to avoid errors when you compile a library with Qt: For release: qmake src.pro CONFIG+=debug_and_release For debug: qmake src.pro CONFIG+=debug_and_release CONFIG+=debug

This make you available two distinct folders "debug" and "release" where there are compiled objects for that specific configuration. So you can find into "src" folder (i.e. for Linux) :

ilnuribat commented 6 years ago

after

qmake ..
make

inqamqp/build/src were create several libs, including libqamqp.so but this wouldn't solve my problem, when I try to build tutorial, for example 'helloworld' /usr/bin/ld: cannot find -lqamqpd

after step LD_LIBRARY_PATH=./src ./tutorials/helloworld/receive/receive I got Segmentation fault (core dumped) Can you help me?