Project

General

Profile

Actions

Bug #3929

closed

wt-3.3.4 compiling error with mingw64

Added by Stefan Ruppert about 9 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Urgent
Assignee:
-
Target version:
Start date:
03/30/2015
Due date:
% Done:

0%

Estimated time:

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

WServer.patch (1.7 KB) WServer.patch Stefan Ruppert, 04/21/2015 10:24 AM
Actions #1

Updated by Stefan Ruppert almost 9 years ago

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

Actions #2

Updated by Wim Dumon almost 9 years ago

  • Status changed from New to Resolved

Hello Stefan,

I applied the patch.

BR,

Wim.

Actions #3

Updated by Stefan Ruppert almost 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

Actions #4

Updated by Wim Dumon almost 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.

Actions #5

Updated by Stefan Ruppert almost 9 years ago

You are right, the mingw installation was screwed up. With a fresh mingw installation the build worked fine!

Regards,

Stefan

Actions #6

Updated by Koen Deforche over 8 years ago

  • Status changed from Resolved to Closed
Actions #7

Updated by Koen Deforche over 8 years ago

  • Target version changed from 3.3.4 to 3.3.5
Actions

Also available in: Atom PDF