I am not sure I understood you Do you mean to compile your application that uses Wt you need to manually tell the compiler to add the "-lwt -lwthttp" flags to the linker ?
If that is it, then it's expected: you must tell your application which third-party libraries it should link to. You would do the same for e. g. libxml2, or gtk+. Also, the proper way to to that in CMake is target_link_libraries(yourapplication wt wthttp): http://www.cmake.org/cmake/help/v3.3/command/target_link_libraries.html If you mean something else, please explain. Thank you PS: This bugreport made me realize I should make impossible to install static and shared libraries at the same time because WConfig.h is different. I will fix that soon. On Sat, Aug 29, 2015 at 10:53 PM, ioann sys <ioann....@gmail.com> wrote: > Now I program only in Linux. SHARED library use. For example, to build the > project Wt, I have to finish writing a file CMakeLists dependent libraries > (set (GXX_FLAGS "-lwt -lwthttp"). > > And we can see my WConfig file: > >> >> > ioann@iosys:~$ cat /usr/include/Wt/WConfig.h > > #ifndef WCONFIG_H > > #define WCONFIG_H > > >> // Version defines > > #define WT_SERIES 3 > > #define WT_MAJOR 3 > > #define WT_MINOR 4 > > >> /*! \brief A constant that encodes the library version of %Wt > > * > > * You may use this constant to check for the version of %Wt at build-time. > > */ > > #define WT_VERSION (((WT_SERIES & 0xff) << 24) | ((WT_MAJOR & 0xff) << 16) >> | ((WT_MINOR & 0xff) << 8)) > > #define WT_VERSION_STR "3.3.4" > > #define WT_CLASS "Wt3_3_4" > > #define WT_INCLUDED_VERSION Wt_3_3_4 > > >> #define RUNDIR "/var/run/wt" > > #define WT_CONFIG_XML "/etc/wt/wt_config.xml" > > #define WTHTTP_CONFIGURATION "/etc/wt/wthttpd" > > >> >> /* #undef WT_STATIC */ > > /* #undef WTDBO_STATIC */ > > /* #undef WTDBOPOSTGRES_STATIC */ > > /* #undef WTDBOSQLITE3_STATIC */ > > /* #undef WTDBOFIREBIRD_STATIC */ > > /* #undef WTDBOMYSQL_STATIC */ > > /* #undef WTHTTP_STATIC */ > > /* #undef WT_EXT_STATIC */ > > /* #undef WT_EXT_STATIC */ > > >> #define WT_HAS_WRASTERIMAGE > > #define WT_HAS_WPDFIMAGE > > #define WT_WITH_SSL > > >> /* #undef WT_NO_BOOST_INTRUSIVE */ > > /* #undef WT_NO_BOOST_RANDOM */ > > /* #undef WT_NO_STD_LOCALE */ > > /* #undef WT_NO_STD_WSTRING */ > > #define WT_USE_OPENGL > > /* #undef WT_DEBUG_ENABLED */ > > #define WT_THREADED > > >> /* #undef WT_USE_BOOST_SIGNALS */ > > #define WT_USE_BOOST_SIGNALS2 > > >> /* Number of bits in a file offset, on hosts where this is settable. */ > > /* #undef _FILE_OFFSET_BITS */ > > >> /* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ > > /* #undef _LARGEFILE_SOURCE */ > > >> /* Define for large files, on AIX-style hosts. */ > > /* #undef _LARGE_FILES */ > > >> // our win32: WIN32 (gcc) or _WIN32 (MSC) > > #if defined(WIN32) || defined(_WIN32) > > #define WT_WIN32 1 > > #endif > > >> #endif > > > Thank for you! > > > 2015-08-29 23:36 GMT+03:00 Pau Garcia i Quiles <pgqui...@elpauer.org>: > >> This looks like the right behavior and is produced by CMake after >> processing WConfig.h.in to generate WConfig.h depending on the >> environment (i. e. third-party libraries, platform, compiler, etc). >> >> The first WConfig.h is from a static build of Wt >> >> The second WConfig.h is from a shared build of Wt >> >> Please note the witty package builds *both* the static and the shared >> version, one in build-static and the other in build-shared. >> >> Are you sure you are comparing build-shared/WConfig.h to >> build-shared/WConfig.h, and build-static/WConfig.h to >> build-static/WConfig.h ? To me, it seems like you are comparting >> build-shared/WConfig.h to build-static/WConfig.h >> >> Could you please check again? >> >> If you still see this problem, please post more information about the >> user/group, hostname, locale, time, toolchain, etc. Some toolchains cannot >> compile some Boost code and therefore build a non-threaded version of Wt >> but I am not aware of a toolchain that cannot build a shared or static >> build*. >> >> * Well, I am: on Windows, older version of MSVC had trouble with Boost >> threads and shared libraries in the way Wt used them, but that does not >> apply here. >> >> Thank you >> >> -- >> Pau Garcia i Quiles >> http://www.elpauer.org >> (Due to my workload, I may need 10 days to answer) >> > > -- Pau Garcia i Quiles http://www.elpauer.org (Due to my workload, I may need 10 days to answer)