我正在尝试在 Qt Creator 中创建的应用程序中使用 QJson 库。操作系统为 Ubuntu 12.04 32 位。
我使用突触安装 libqjson0 (0.7.1-6)。该库安装在
/usr/lib/i386-linux-gnu/libqjson.so.0
/usr/lib/i386-linux-gnu/libqjson.so.0.7.1
我试图通过右键单击我的项目并选择“添加库..”来将库添加到 Qt Creator。当我输入上面显示的 2 个路径中的任何一个时,文件名是红色的,表示它不正确。我创建了一个符号链接libqjson.so链接到 libqjson.so.0.7.1。我现在可以使用 /usr/lib/i386-linux-gnu/libqjson.so 路径添加库。
现在是菜鸟问题:在应用程序的顶部,我添加了#include <parser.h>。我得到一个错误'parser.h:没有这样的文件或目录。我在 /usr/libs/i386-linux-gnu 中搜索 parser.h 并没有返回任何结果。我需要在 parser.h 之前添加一些东西还是我错过了其他东西?
编辑: .pro 文件附在下面
#-------------------------------------------------
#
# Project created by QtCreator 2012-10-05T20:40:21
#
#-------------------------------------------------
QT += core gui
QT += network
TARGET = zf
TEMPLATE = app
SOURCES += main.cpp\
zftest.cpp \
api1_6.cpp
HEADERS += zftest.h \
api1_6.h
FORMS += zftest.ui
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../../../../usr/lib/qt4/plugins/crypto/release/ -lqca-ossl
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../../../../usr/lib/qt4/plugins/crypto/debug/ -lqca-ossl
else:symbian: LIBS += -lqca-ossl
else:unix: LIBS += -L$$PWD/../../../../../../usr/lib/qt4/plugins/crypto/ -lqca-ossl
INCLUDEPATH += $$PWD/../../../../../../usr/lib/qt4/plugins/crypto
DEPENDPATH += $$PWD/../../../../../../usr/lib/qt4/plugins/crypto
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../../../../usr/lib/release/ -lqca
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../../../../usr/lib/debug/ -lqca
else:symbian: LIBS += -lqca
else:unix: LIBS += -L$$PWD/../../../../../../usr/lib/ -lqca
INCLUDEPATH += $$PWD/../../../../../../usr/include
DEPENDPATH += $$PWD/../../../../../../usr/include
OTHER_FILES += \
README.txt
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../../../../usr/lib/i386-linux-gnu/release/ -lqjson
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../../../../usr/lib/i386-linux-gnu/debug/ -lqjson
else:symbian: LIBS += -lqjson
else:unix: LIBS += -L$$PWD/../../../../../../usr/lib/i386-linux-gnu/ -lqjson
INCLUDEPATH += $$PWD/../../../../../../usr/lib/i386-linux-gnu
DEPENDPATH += $$PWD/../../../../../../usr/lib/i386-linux-gnu