Bug #3929
closedwt-3.3.4 compiling error with mingw64
0%
Description
Hi,
I'm currently compiling official wt-3.3.4 release with mingw64 in 32bit and 64bit mode. The following compiler errors occures:
mingw64 32bit mode:
[ 87%] Building CXX object src/CMakeFiles/wttest.dir/Wt/Test/WTestEnvironment.obj
In file included from C:/opt/tmp/wt-3.3.4/src/web/WebController.h:16:0,
from C:/opt/tmp/wt-3.3.4/src/web/WebSession.h:29,
from C:/opt/tmp/wt-3.3.4/src/web/Configuration.h:25,
from c:/opt/tmp/wt-3.3.4/src/Wt/Test/WTestEnvironment.C:13:
C:/opt/tmp/wt-3.3.4/src/Wt/WServer:444:29: error: function 'Wt::WLocalizedStrings* Wt::WServer::localizedStrings()' definition is marked dllimport
C:/opt/tmp/wt-3.3.4/src/Wt/WServer:464:19: error: function 'Wt::WLogger& Wt::WServer::logger()' definition is marked dllimport
C:/opt/tmp/wt-3.3.4/src/Wt/WServer:480:25: error: function 'Wt::WebController* Wt::WServer::controller()' definition is marked dllimport
In file included from c:/opt/tmp/wt-3.3.4/src/http/Configuration.C:9:0:
C:/opt/tmp/wt-3.3.4/src/Wt/WServer:444:29: error: function 'Wt::WLocalizedStrings* Wt::WServer::localizedStrings()' definition is marked dllimport
C:/opt/tmp/wt-3.3.4/src/Wt/WServer:464:19: error: function 'Wt::WLogger& Wt::WServer::logger()' definition is marked dllimport
C:/opt/tmp/wt-3.3.4/src/Wt/WServer:480:25: error: function 'Wt::WebController* Wt::WServer::controller()' definition is marked dllimport
make[2]: *** [src/CMakeFiles/wttest.dir/Wt/Test/WTestEnvironment.obj] Error 1
make[1]: *** [src/CMakeFiles/wttest.dir/all] Error 2
mingw64 64bit mode:
[ 4%] Building CXX object src/CMakeFiles/wt.dir/Wt/Resizable.obj
In file included from c:\mingw\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/include/wchar.h:10:0,
from c:\mingw\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../include/c++/4.7.2/cwchar:46,
from c:\mingw\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../include/c++/4.7.2/bits/postypes.h:42,
from c:\mingw\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../include/c++/4.7.2/bits/char_traits.h:42,
from c:\mingw\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../include/c++/4.7.2/string:42,
from C:/opt/tmp/wt-3.3.4/src/Wt/WApplication:11,
from c:/opt/tmp/wt-3.3.4/src/Wt/Resizable.C:7:
c:\mingw\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/include/_mingw_print_push.h:10:2: error: #error "__USE_MINGW_ANSI_STDIO"
make[2]: *** [src/CMakeFiles/wt.dir/Wt/Resizable.obj] Error 1
Files
Updated by Stefan Ruppert over 9 years ago
- File WServer.patch WServer.patch added
Hi,
today I managed to compile wt-3.3.4 with mingw64 in 32-bit mode by applying the attached WServer.patch! It seems to me that inlining a dllimport marked method does not work with mingw64 (gcc.exe (rubenvb-4.7.2-release) 4.7.2)
Regards,
Stefan
Updated by Wim Dumon over 9 years ago
- Status changed from New to Resolved
Hello Stefan,
I applied the patch.
BR,
Wim.
Updated by Stefan Ruppert over 9 years ago
Hi Wim,
the 64-bit build error still exists... It seems to me a CMake issue!? Where can I define the
"__USE_MINGW_ANSI_STDIO" at best? I'm not really a CMake export... ;-)
BTW, with wt-3.3.2 a 64-bit mingw64 build worked fine with the same compiler... Did you changed something in CMake regarding mingw?
Regards,
Stefan
Updated by Wim Dumon over 9 years ago
I can't remember that we changed something in that area. This actually looks like a bug in mingw: including fails.
If you want to try to define that symbol (but that looks wrong to me): simply add ADD_DEFINITIONS(__USE_MINGW_ANSI_STDIO) in the toplevel CMakeLists.txt.
BR,
Wim.
Updated by Stefan Ruppert over 9 years ago
You are right, the mingw installation was screwed up. With a fresh mingw installation the build worked fine!
Regards,
Stefan
Updated by Koen Deforche about 9 years ago
- Status changed from Resolved to Closed
Updated by Koen Deforche about 9 years ago
- Target version changed from 3.3.4 to 3.3.5