简体   繁体   中英

Run Wt Framework in Qt Creator

I'm just trying to run an example from https://www.webtoolkit.eu/wt

I have downloaded precompiled binaries from https://github.com/emweb/wt/releases

I choose "Wt-4.3.1-msvs2017-Windows-x64-SDK.zip" and extracted into a folder.

Kit i use: Qt 5.12.0 MSVC 2017 x64

Then i added into my Qt project.pro file next lines:

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

In main.cpp i added the next code:

#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;
    });
}

When i try to run this stuff i get an error (127 errors): LNK 2001, LNK 2019, LNK 1120

Here is screenshot of the errors and source

.pro file

I think you need to specify which libs you need to link with explicitly. Check out: How to add additional libraries to Visual Studio project?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM