(C++) 'Hello Wt' using Qt Creator under Raspian

January 25, 2018 · View on GitHub

 

 

 

 

 

(C++) 'Hello Wt' using Qt Creator under Raspian

 

Hello Wt application using Qt Creator under Raspian.

 

 

Technical facts

 

Application type(s)

Operating system(s) or programming environment(s)

IDE(s):

Project type:

C++ standard:

Compiler(s):

Libraries used:

 

 

 

 

 

Qt project file: CppHelloWtQtCreatorRaspbian.pro

 


QT       += core QT       -= gui LIBS += -L/usr/lib -lwt -lwthttp -lboost_signals QMAKE_CXXFLAGS += -DNDEBUG CONFIG   += console CONFIG   -= app_bundle TEMPLATE = app SOURCES += main.cpp

 

 

 

 

 

main.cpp

 


 

 

 

 

 

start.sh

 


qmake make rm Makefile rm main.o ./CppHelloWtQtCreatorRaspbian --docroot . --http-address 0.0.0.0 --http-port 8080

 

 

 

 

 

Deploying the Wt application locally

 

Call the start.sh script:


./start

 

In the end you will see something like shown below. Your web server is running now.

 


[2010-Nov-19 16:41:38.365920] 6360 - [notice] "Wt: initializing built-in httpd" [2010-Nov-19 16:41:38.366043] 6360 - [notice] "Reading Wt config file: /etc/wt/wt_config.xml (location = '/home/richel/qtsdk-2010.04/bin/Projects/Website/CppHelloWtQtCreatorUbuntu-build-desktop/CppHelloWtQtCreatorUbuntu')" [2010-Nov-19 16:41:38.366592] 6360 - [notice] "Started server: http://0.0.0.0:8080"

 

Now, start your web browser and go to the following address:

 


http://127.0.0.1:8080/

 

You will see the 'Hello Wt' dynamic website. You just deployed your Wt application locally. This is just fine for debugging. If the application is ready to be put on the web, deploy the Wt application globally.