[英]Add Casablanca REST to Qt-Creator
I'm trying to add Casablanca to a C++/Qt-Creator project on Linux in order to consume some Rest-Services. 我正在尝试将Casablanca添加到Linux上的C ++ / Qt-Creator项目中,以便使用一些Rest-Services。 But the compiler always says "'cpprest/http_client.h' file not found".
但是编译器总是说“找不到'cpprest / http_client.h'文件”。
Casablanca built without problems and the tests also run fine. 卡萨布兰卡(Casablanca)的建造没有问题,测试也运行良好。
I tried adding the library as an external library with the "Add Library Wizard". 我尝试使用“添加库向导”将库添加为外部库。 The .pro file now contains:
.pro文件现在包含:
win32:CONFIG(release, debug|release): LIBS += -
L$$PWD/../casablanca/build.release/Binaries/release/ -lcpprest
else:win32:CONFIG(debug, debug|release): LIBS += -
L$$PWD/../casablanca/build.release/Binaries/debug/ -lcpprest
else:unix: LIBS += -L$$PWD/../casablanca/build.release/Binaries/ -lcpprest
INCLUDEPATH += $$PWD/../casablanca/build.release/Binaries
DEPENDPATH += $$PWD/../casablanca/build.release/Binaries
I would be glad if someone can help me. 如果有人可以帮助我,我会很高兴。
I think you have missed to extend the paths where the compiler should look for the include files. 我认为您错过了扩展编译器查找包含文件的路径。 You might try to add the following statement to your .pro file:
您可以尝试将以下语句添加到.pro文件中:
unix:INCLUDEPATH += $$PWD/../casablanca/include
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.