c++ - Qt qmake windows中的链接龙框架
问题描述
我想从 Dragon Framework 编译 HelloWorld 示例,但我无法将库 boost 库链接到文件 .pro 中的项目。我在库文件中有编译错误,因为“boost/utility/string_view 没有这样的文件或目录”。
这是一个错误
E:\dev\vcpkg\installed\x86-windows\include\drogon\utils\string_view.h:19: błąd: boost/utility/string_view.hpp: No such file or directory
In file included from E:/dev/vcpkg/installed/x86-windows/include/drogon/HttpRequest.h:18:0,
from E:/dev/vcpkg/installed/x86-windows/include/drogon/HttpBinder.h:24,
from E:/dev/vcpkg/installed/x86-windows/include/drogon/HttpAppFramework.h:21,
from E:/dev/vcpkg/installed/x86-windows/include/drogon/HttpController.h:19,
from ../dragonTest/HelloController.cc:1:
E:/dev/vcpkg/installed/x86-windows/include/drogon/utils/string_view.h:19:10: fatal error: boost/utility/string_view.hpp: No such file or directory
#include <boost/utility/string_view.hpp>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
QT -= gui
CONFIG += c++14 console
CONFIG -= app_bundle
# You can make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
SOURCES += \
HelloController.cc \
HelloViewController.cc \
main.cpp
# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
INCLUDEPATH += "E:/dev/boost/include" \
"E:/dev/vcpkg/installed/x86-windows/include"
DEPENDPATH += "E:/dev/boost/include" \
"E:/dev/vcpkg/installed/x86-windows/include"
LIBS += -L"E:/dev/vcpkg/installed/x86-windows/lib/" -ldrogon -lzlib
我尝试将 boost 目录复制到 Dragon 框架内部,但即使这样也不起作用。
解决方案
推荐阅读
- python - 将文件排列到numpy数组中
- python - ValueError:无法将输入数组从形状 (22640,32) 广播到形状 (22639,32)
- elasticsearch - ElasticSearch DSL 查询不适用于特定字段
- asp.net - ASP.NET Razor - 如何为对象列表创建 POST 表单?
- office365 - manifest.XML 和其他 Yeoman Generator 文件实际上是做什么的?
- javascript - 在动态下拉angularjs中设置默认值
- html - 将图像放在提交表单旁边的问题,彼此相邻
- multi-tenant - 分别为每个租户生成新的程序编号
- signals - 您能否列出一些识别一维信号中的模式或轮廓的方法?
- java - 自定义 Intent 广播在后台的 android oreo 及更高版本中不起作用