Qt / C ++链接错误(未定义引用)

时间:2014-04-09 10:03:52

标签: c++ qt

当我尝试与静态C / C ++库建立链接时,我遇到了麻烦。使用QtCreator 2.7.2 / Qt4.8 / RHEL6。这里.pro文件:

QT       += core gui widgets
DESTDIR = ../bin

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

LIBS += -L$$PWD/../bin/ -lsip
INCLUDEPATH += $$PWD/../sip/include

TARGET = sipgui
TEMPLATE = app

SOURCES += main.cpp\
....

HEADERS  += \
connectionpool.h \
....

FORMS    += dialog.ui

unix|win32: LIBS += -lcurses

当我从我的项目中调用库方法时,我得到了未定义的引用"编译错误:

thread.o: In function `print_last_stats':
/home/virtual/Project/sip/build-sipgui-Desktop-Debug/../sipgui/thread.cpp:61: undefined           reference to `print_statistics'
....
/home/virtual/Project/sip/build-sipgui-Desktop-Debug/../sipgui/thread.cpp:64: undefined        reference to `print_statistics'
/home/virtual/Project/sip/sipgui/../bin//libsip.a(sipp-scenario.o): In function `scenario::parseAction(CActions*)':
/home/virtual/Desktop/sipp-3.4.1/sipp-3.4.1/src/scenario.cpp:1627: undefined reference to `hasMedia'

那么,我做错了什么?

0 个答案:

没有答案