【问题标题】:Run Wt Framework in Qt Creator在 Qt Creator 中运行 Wt 框架
【发布时间】:2020-09-22 12:34:43
【问题描述】:

我只是想从https://www.webtoolkit.eu/wt 运行一个示例

我已经从https://github.com/emweb/wt/releases下载了预编译的二进制文件

我选择“Wt-4.3.1-msvs2017-Windows-x64-SDK.zip”并解压到一个文件夹中。

我使用的套件:Qt 5.12.0 MSVC 2017 x64

然后我将下一行添加到我的 Qt 项目 .pro 文件中:

LIBS += -L"C:/wt/lib"
INCLUDEPATH += C:/wt/include

在 main.cpp 我添加了下一个代码:

#include <Wt/WApplication.h>
#include <Wt/WServer.h>

int main(int argc, char *argv[])
{
    return Wt::WRun(argc, argv, [](const Wt::WEnvironment &env){
        auto app = std::make_unique<Wt::WApplication>(env);
        return app;
    });
}

当我尝试运行这些东西时,我得到一个错误(127 个错误):LNK 2001、LNK 2019、LNK 1120

这是错误的截图和来源

.pro 文件

【问题讨论】:

    标签: c++ qt-creator wt


    【解决方案1】:

    我认为您需要指定需要显式链接的库。签出:How to add additional libraries to Visual Studio project?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-03-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多