Search code examples
c++frameworkswt

How can I build WidgetGallery in Wt examples?


I installed Wt 3.3.3 from source on Ubuntu and compiled all the examples. Now I'm trying to run WidgetGallery example by following instructions in README.md file, but the required widgetgallery.wt file is missing, in fact, the whole ../../build/examples/widgetgallery directory is missing.

This is how I try to run it:

../../build/examples/widgetgallery/widgetgallery.wt --docroot docroot --approot approot --http-address 0.0.0.0 --http-port 8080

How do I build widgetgallery.wt?


Solution

  • widget gallery requires a C++11 capable compiler and you must explicitly enable C++11 support in Wt for gcc by specifying the appropriate C++11 flag:

    cmake .... -DWT_CPP_11_MODE=-std=c++11
    

    the boost libraries should in fact also be compiled with the same flag, since it's API and class layout changes for some classes when C++11 is turned on