Project

General

Profile

Installing Wt on MinGW » History » Version 4

Jay Health, 03/13/2013 11:21 AM

1 1 Wim Dumon
h1. Installing Wt on MinGW
2
3
h2. MinGW requirements
4
5
This guide used the TDM-gcc (4.5.1-tdm-4).
6
The shell commands were executed in the 'MinGW Command Propmpt' of the TDM-gcc installation.
7
8
h2. Build Boost
9
10
First, bootstrap boost
11
<pre>
12
cd boost_1_43_0
13
bootstrap.bat
14
</pre>
15
16 4 Jay Health
"DC Escorts":http://www.endlessladies.com
17
18 2 Wim Dumon
Before building boost, consider to apply the two patches provided below. These are bugs that may be fixed in future versions of boost and cygwin, but compilation of Wt failed whith boost 1.44 and TDM-gcc 4.5.1-tdm-4.
19
20
Build the required libraries
21 1 Wim Dumon
<pre>
22 3 Wim Dumon
bjam --prefix=i:/mingw-libraries/boost link=static threading=multi --layout=versioned --toolset=gcc --with-date_time --with-filesystem --with-program_options --wit-random --with-regex --with-signals --with-system --with-thread install
23 1 Wim Dumon
</pre>
24
25 3 Wim Dumon
This only builds the required libraries. It will take a while before boost is installed. If the boost.random library does not exist for your boost version, then simply omit it from the bjam command line.
26 1 Wim Dumon
27 4 Jay Health
"Hire Escorts":http://www.endlessladies.com
28 1 Wim Dumon
29
Note: If you get link errors with boost.thread, Tomasz Kalicki points out that you may want to fix the boost header files. This is not necessarily required for Wt versions newer than 3.1.5 as those will define BOOST_THREAD_USE_LIB when not linking to a dynamic boost (-DBOOST_DYNAMIC=OFF), but you may want to use it anyway if you use boost.thread in your own application.
30
<pre>
31
--- oldconfig.hpp       2010-07-09 20:13:09.000000000 +0200
32
+++ config.hpp  2010-09-16 11:11:48.000000000 +0200
33
@@ -37,7 +37,7 @@
34
 #elif defined(BOOST_THREAD_USE_LIB)   //Use lib
35
 #else //Use default
36
 #   if defined(BOOST_THREAD_PLATFORM_WIN32)
37
-#       if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN)
38
+#       if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN) || defined(__MINGW32__)
39
            //For compilers supporting auto-tss cleanup
40
            //with Boost.Threads lib, use Boost.Threads lib
41
 #           define BOOST_THREAD_USE_LIB
42
</pre>
43
See https://svn.boost.org/trac/boost/ticket/4614
44
45
<pre>
46
--- libs/thread/src/win32/tss_pe.cpp.orig       2010-09-16 15:46:01.375000000 +0200
47
+++ libs/thread/src/win32/tss_pe.cpp    2010-09-16 15:46:53.906250000 +0200
48
@@ -54,6 +54,7 @@
49
     PIMAGE_TLS_CALLBACK __crt_xl_end__ __attribute__ ((section(".CRT$XLZ"))) = 0;
50
 }
51
52
+#if 0
53
 extern "C" const IMAGE_TLS_DIRECTORY32 _tls_used __attribute__ ((section(".rdata$T"))) =
54
 {
55
         (DWORD) &__tls_start__,
56
@@ -63,6 +64,7 @@
57
         (DWORD) 0,
58
         (DWORD) 0
59
 };
60
+#endif
61
62
63
 #elif  defined(_MSC_VER) && !defined(UNDER_CE)
64
65
</pre>
66
67
See https://svn.boost.org/trac/boost/ticket/4258
68
69
h3. Build Wt
70
71
<pre>
72
cmake c:/cygwin/home/Wim/projects/wt-git/wt -DBOOST_DIR=i:/mingw-libraries/boost -DBOOST_COMPILER=mgw45 -DBOOST_VERSION=1_44 -G "MinGW Makefiles"
73
</pre>
74
75 2 Wim Dumon
Then build Wt and the examples
76 1 Wim Dumon
<pre>
77
mingw32-make
78
</pre>
79
80 4 Jay Health
The Isapi connector is not built under MinGW because the httpext.h file provided with MinGW misses several declarations. I suspect that with a complete httpext.h header, it is possible to build the isapi connector without problems. http://www.endlessladies.com