About examples
Added by Christophe Martinez about 14 years ago
Hi. I just installed Wt and I've been trying to compile the Hello World example but I when do use "cmake -C wtexamples/" I get :
loading initial cache file wtexamples/
CMake Error at CMakeLists.txt:10 (WT_ADD_EXAMPLE):
Unknown CMake command "WT_ADD_EXAMPLE".--- Configuring incomplete, errors occurred!
The CMakeLists.txt is as followed :
#
# The ADD_EXAMPLE macro (defined in examples/CMakeLists.txt) ensures
# that the example is correctly built for the requested connector. It is
# equivalent to the following two lines:
# ADD_EXECUTABLE(hello.wt hello.C) TARGET_LINK_LIBRARIES(hello.wt
# ${EXAMPLES_CONNECTOR}) except when the ISAPI (for Microsoft IIS)
# connector is used, where it will build a DLL with the proper symbols
# exported.
#
WT_ADD_EXAMPLE(hello.wt hello.C)
#
# If you have Wt installed somehwere, you should use the installed Wt
# header files for your own Wt projects. e.g.
# INCLUDE_DIRECTORIES(/usr/local/include) instead of the following:
#
cmake_minimum_required(VERSION 2.8)INCLUDE_DIRECTORIES(${WT_SOURCE_DIR}/src)
What should I do to make it work? I installed Wt from packages. I'm using Ubuntu 10.04.
Replies (2)
RE: About examples - Added by Pau Garcia i Quiles about 14 years ago
Hi,
Package maintainer here.
What version of Wt are you using (3.1.2? 3.1.8?) ?
Are you following the instructions in /usr/share/doc/libwt-doc/README.Debian ? If you are, please post the output for all the commands prescribed there. If you are not, please do :-)
Please note the Wt examples are not buildable as-shipped by Emweb, therefore I am patching them, and you need to issue a few parameters to CMake (see README.Debian).
RE: About examples - Added by Pau Garcia i Quiles about 14 years ago
Hi again,
Ubuntu 10.04? Are you still using Wt 2.2.4 or did you install from my PPA? (I guess you are using my PPA because WT_ADD_EXAMPLE was not in 2.2.4)