Hello I want to use a third party library in my Qt Project. I use QtCreator...
The Doc of the third party lib provide a Makefile, but I don't know how I can link my QT Project against the third party Makefile.
Maybe someone can help me...
thanks
Hello I want to use a third party library in my Qt Project. I use QtCreator...
The Doc of the third party lib provide a Makefile, but I don't know how I can link my QT Project against the third party Makefile.
Maybe someone can help me...
thanks
Pursue your targets and don't give up....
What does this Makefile do? Does it build the library? Does it install it?
it is the makefile to use hypertable:
Qt Code:
CC=g++ CFLAGS=-c -Wall -D_REENTRANT -I/opt/hypertable/current/include \ -I/opt/hypertable/current/include/thrift LDFLAGS=-rdynamic -L/opt/hypertable/current/lib -lHyperThrift \ -lHyperCommon -lHypertable -lthrift -levent -llog4cpp all: client_test client_test: client_test.o $(CC) client_test.o $(LDFLAGS) -o client_test client_test.o: client_test.cc $(CC) $(CFLAGS) client_test.cc clean: rm -rf *o client_testTo copy to clipboard, switch view to plain text mode
Pursue your targets and don't give up....
You don't use the Makefile.
Put the relevant -L and -l options from the LDFLAGS variable in your PRO file LIBS variable. The paths from the CFLAGS -I options go in the INCLUDEPATH in the PRO file.
thanks
I tried it already, but there is a problem:
Qt Code:
QT += core QT -= gui INCLUDEPATH += /opt/hypertable/current/include \ /opt/hypertable/current/include/thrift LIBS += -L/opt/hypertable/current/lib LIBS += -lHyperThrift -lHyperCommon -lHypertable -lthrift -levent -llog4cpp TARGET = hypertable_test CONFIG += console CONFIG -= app_bundle TEMPLATE = app SOURCES += main.cppTo copy to clipboard, switch view to plain text mode
The compiler errors:
/usr/bin/ld: cannot find -lthrift
/usr/bin/ld: cannot find -levent
/usr/bin/ld: cannot find -llog4cpp
Pursue your targets and don't give up....
Have you properly compiled and installed the thrift, event, and log4cpp libraries? Do you even need them?
Last edited by Qtonimo; 16th August 2012 at 12:09.
Pursue your targets and don't give up....
Bookmarks