Wt Installation


To make your website in Wt, first you need to install Wt in your Ubuntu system.
Installing Wt from Official packages

$ sudo apt-get install witty witty-dev witty-doc witty-dbg witty-examples

The official package is usually a bit outdated due to the stabilization periods Debian and Ubuntu need prior to release.

To install recent version, Install from Prebuilt Packages
To install Wt, add the Wt PPA to your repositories (check “Adding this PPA to your system” in the Wt PPA page). After adding the repository to your system, run:

 $ sudo apt-get update
$ sudo aptitude install libwt* 
$ /usr/lib/Wt/examples/hello/hello

The last package (witty-examples) installs the examples in /usr/lib/Wt/examples.

After installation…
To compile a basic hello world example given in Wt examples, write following commands in terminal(ctrl+alt+t)

cd /usr/lib/Wt/examples/
ls
cd hello
ls
 g++ -o f1 hello.C  -I/usr/local/include -L/usr/local/lib -lwthttp -lwt -lboost_regex -lboost_signals -lboost_system -lboost_thread -lboost_filesystem -lboost_date_time 

Here f1 is the name of the object file or target file,any desired name can be used and hello.C is the name of the source program of hello world example given in Wt examples

The other way of compilation is by using cmake. To make cmake and make files you can follow this

To execute the object file…

./f1 --docroot . --http-address 0.0.0.0 --http-port 1234 

With this the object program will be executed and can be run on a web browser

Now, open the web browser,write http-address (here 0.0.0.0) and http-port(here :1234) in the address bar

Finally press enter, and have the output of the program on your browser screen


A new Tcc