Need help with building Wt for Windows using MinGW
Added by Michael Knight almost 6 years ago
I want to build Wt on my 32bit Windows 7 Home Premium ( not SP1) Pc.I don't want to install Visual Studio, mostly cause I don't want to install Service pack 1,because it's a bit risky,I don't want to have to reinstall Windows + all the games + all the programs if a big problem happens during/after installation.(I haven't reinstalled Windows for about 7-8 years.).Also even if I want to upgrade to Service Pack 1 , it doesn't work, it gives error when I update using Windows Update or download theexecutable file manually.
If I download binary builds for Windows(executable from WT website) which built with Visual Studio, I think I need to have Visual Studio to be able to use it.
So I want to build WT using MinGW.I downloaded boost library version 1.53.0, 1.54-0, 1.52.0, Wt version 3.2.0, 3.3.11,3.4.0, cmake 3.15.0, Mingw version 8.2, TDM-GCC 4.7.1.
I was able to build boost library using Mingw 8.2 but it said it skipped some targets and failed to build some targets, though it got completed.
Then I entered the wt source directory and wrote:
cmake j:/wt/wt/1.54.00 -G "MinGW Makefiles"
It gave errors and couldn't complete configuration.
I tried applying patches described here(for boost):
https://redmine.emweb.be/projects/wt/wiki/Installing_Wt_on_MinGW
After I applied these patches,I tried again to build Wt, but actually errors didn't change much.
I tried building with different versions.For example,I removed MingW 8.2 and installed TDM-GCC 4.7.1.While building boost, this time it didn't skip any targets and also didn't fail any targets.But when I tried building wt, I got again similar/same error messages.I tried installing using Msys shell like explained on:
https://redmine.emweb.be/projects/wt/wiki/Installing_Wt_on_MinGW
but these efforts didn't change the result.
I included here files which show some parts of Wt building process.
problem-3.jpg (363 KB) problem-3.jpg | |||
problem-2.jpg (425 KB) problem-2.jpg | |||
problem-1.png (81.2 KB) problem-1.png |
Replies (6)
RE: Need help with building Wt for Windows using MinGW - Added by Michael Knight almost 6 years ago
Also the log of CMakeError.log:
Determining if the include file pthread.h exists failed with the following output:
Change Dir: J:/wt/wt-3.3.11-build5/CMakeFiles/CMakeTmp
Run Build Command(s):C:/msys/1.0/bin/make.exe cmTC_e64e1/fast && /bin/make -f CMakeFiles/cmTC_e64e1.dir/build.make CMakeFiles/cmTC_e64e1.dir/build
make[1]: Entering directory `/j/wt/wt-3.3.11-build5/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_e64e1.dir/CheckIncludeFile.c.obj
/C/MinGW32/bin/gcc.exe -o CMakeFiles/cmTC_e64e1.dir/CheckIncludeFile.c.obj -c /J/wt/wt-3.3.11-build5/CMakeFiles/CMakeTmp/CheckIncludeFile.c
j:/wt/wt-3.3.11-build5/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:21: fatal error: pthread.h: No such file or directory
compilation terminated.
make[1]: * [CMakeFiles/cmTC_e64e1.dir/CheckIncludeFile.c.obj] Error 1
make[1]: Leaving directory `/j/wt/wt-3.3.11-build5/CMakeFiles/CMakeTmp'
make: * [cmTC_e64e1/fast] Error 2
RE: Need help with building Wt for Windows using MinGW - Added by Michael Knight almost 6 years ago
Well, after days and many hours of searching the internet for a cure to build problems, trying so many solutions, I think I found the right combination of tools:
CmakeS2.8 version
GCC/Mingw's TDM-gcc 4.7.1 version
MSYS's 1.0 version
Wt's 3.2.3 version
Boost's 1.52.0 version
I haven't yet tested it with examples but building of Wt completed(%100) without problems.
RE: Need help with building Wt for Windows using MinGW - Added by Michael Knight almost 6 years ago
Well, I spoke too soon.There are no header files generated.
RE: Need help with building Wt for Windows using MinGW - Added by Michael Knight almost 6 years ago
But in "examples" folder, there are some directories and somehow they have files like "hello.wt.exe" and they run perfectly.But I am not able to find header files/.h files in the wt directories.
RE: Need help with building Wt for Windows using MinGW - Added by Roel Standaert almost 6 years ago
What do you mean, there are no header files generated? Maybe the fact that Wt 3's header files don't have a .h extension is tripping you up? All of the headers of Wt are in src/Wt
next to the .C
implementation files. They are installed into include/Wt
in whatever CMAKE_INSTALL_PREFIX
is set to when you install Wt.
RE: Need help with building Wt for Windows using MinGW - Added by Michael Knight almost 6 years ago
Thanks for your answer.
Actually after I wrote the command:
make install
It worked and installed the Wt to c:\program files\wt.Yes, still there is no .h files but like you said we should use the header files without .h extension and it is working.Before installation there was no folder called "include" or "lib" although the project was built.
I was applying the things instructed here:
https://redmine.webtoolkit.eu/projects/wt/wiki/Installing_Wt_on_MinGW
but it does not say run the command "make install", it just says "make"...