Saturday, February 22, 2014

How to check if Wt framework is installed correctly on Debian wheezy?

Answer: it is needed to build Wt examples.
If Wt framework is installed correctly then examples will be built successfully.

Below are steps how to build Wt examples.
Here is considered that Wt is installed with examples and libwtfcgi-dev.
How to install it you can read here.

Steps to build Wt examples on Debian wheezy:

1. Create directory where cmake will create makefiles:
#> mkdir /home/%user%/build/wtexamples
#> cd /home/%user%/build/wtexamples

2.  Run cmake to create makefiles:
#> cmake -DWT_SOURCE_DIR=/usr/lib/Wt \
    -DCONNECTOR_FCGI=ON \
        -DEXAMPLES_CONNECTOR="wtfcgi" \
        -DCMAKE_BUILD_TYPE=Release \
        /usr/lib/Wt/examples

3. Build hello example:
#> cd /home/%user%/build/wtexamples/hello
#> make

In result you should get something like that:

4. If hello example is built successfully then you can try to build all examples:
#> cd /home/%user%/build/wtexamples
#> make

If all examples is built successfully most probably your Wt was installed properly.

How to install Wt framework on Debian wheezy?

Steps to install stable version of Wt framework on Debian wheezy:

0. Update your Debian wheezy:
#>sudo apt-get update

1. Install stable Debian boost version: 
#>sudo apt-get install libboost-all-dev

2. Install witty packages: 
#>sudo apt-get install witty witty-dbg witty-doc witty-dev witty-examples

3. [Optional] If you want to use Wt with fastcgi:
#>sudo apt-get install libwtfcgi-dev

That is all.
How to check if witty is installed correctly you can read here.