Project

General

Profile

How to build a Wt program to execute on Windows

Added by Alex Gouws about 5 years ago

Okay I'm going to describe the whole process I do from start to finish with as much detail as possible.

I'm new to Wt and I'm trying to build the actual application so that I can run it on Windows.

I followed the tutorial (https://redmine.webtoolkit.eu/projects/wt/wiki/Installing_Wt_on_MS_Windows) to install Wt using the binaries downloaded from Github (Wt-4.0.5-msvs2017-Windows-x86-SDK.exe). I'm using VS2017.

I create a new empty C project in VS with a single main.cpp file with some Wt code. I then used the "The Easy Method" from the link above to add all the additional Libs and Include paths and linker requirements etc. (Like C:\Program Files (x86)\Wt 4.0.5 msvs2017 x86/include) The project is in x86/Win32. I then added the "---docroot . ---http-address 0.0.0.0 ---http-port 8080" debug command to the project as well as the Environment to "PATH=C:\Program Files (x86)\Wt 4.0.5 msvs2017 x86\bin".

Everything works fine and it executes in VS in debug. How can I build the program so that I can execute it independently outside of VS on Windows?

Is there a specific way to build or run it? Does it need to be executed via CMD or is there some other specific way?

There doesn't seem to be much documentation out there for this (unless I've missed something).

Any help would be really helpful!

Thanks


Replies (1)

RE: How to build a Wt program to execute on Windows - Added by Alex Gouws about 5 years ago

I ended up solving my own problem. Simple enough actually. Copy all the necessary DLLs to the exe folder, then execute via CMD adding the ---docroot . ---http-address 0.0.0.0 ---http-port 8080 commands :)

I never thought I would be using C for web dev. Really amazing stuff!

    (1-1/1)