2015-11-23 63 views
2

如果你看到我的trouble with installing wxwidgets 1,如果你太讓問題再次ü必須看這個問題,並閱讀答案 讓我們開始,刪除無用的GCC路徑後,我在控制檯得到這個:故障與安裝的wxWidgets 2

from ../../src/common/any.cpp:18: 
C:/TDM-GCC-32/lib/gcc/mingw32/5.1.0/include/c++/bits/c++0x_warning.h:32:2: error 
: #error This file requires compiler and library support for the ISO C++ 2011 st 
andard. This support is currently experimental, and must be enabled with the -st 
d=c++11 or -std=gnu++11 compiler options. 
#error This file requires compiler and library support for the \ 
^
In file included from ..\..\include/wx/string.h:46:0, 
       from ..\..\include/wx/any.h:19, 
       from ../../src/common/any.cpp:18: 
..\..\include/wx/strvararg.h:350:18: error: 'is_enum' in namespace 'std' does no 
t name a template type 
    typedef std::is_enum<T> is_enum; 
       ^
..\..\include/wx/strvararg.h:354:54: error: 'is_enum' was not declared in this s 
cope 
    enum { value = wxFormatStringSpecifierNonPodType<is_enum::value>::value }; 
                ^
..\..\include/wx/strvararg.h:354:68: error: template argument 1 is invalid 
    enum { value = wxFormatStringSpecifierNonPodType<is_enum::value>::value }; 
                    ^
makefile.gcc:11712: recipe for target 'gcc_mswud\baselib_any.o' failed 
mingw32-make: *** [gcc_mswud\baselib_any.o] Error 1 

C:\wxWidgets-3.0.2\build\msw> 

這是命令

cd %WXWIN%\build\msw 
mingw32-make -f makefile.gcc clean 
>>>mingw32-make -f makefile.gcc BUILD=debug SHARED=0 MONOLITHIC=0 UNICODE=1 WXUNIV=0<<< 
mingw32-make -f makefile.gcc BUILD=release SHARED=0 MONOLITHIC=0 UNICODE=1 WXUNIV=0 
+0

它明確告訴你錯誤。在你輸出的第三行,它表示你的編譯器不支持C++ 2011.啓用支持或升級你的編譯器。 –

+0

如何運行支持C++ 2011? – MaximPro

+0

錯誤消息告訴你如何啓用它。它可能看起來像亂碼,但你應該仔細閱讀編譯器的警告和錯誤。 –

回答

4

不幸的wxWidgets 3.0.2 G ++ 5.1(甚至更早,也許接近,G ++ 4.9),因此它不會與它在C +編譯開箱之前已被釋放+98模式時使用它。這個問題已經修復,但不是在正式版本,所以你有2個選擇:

  1. this fix應用到你的來源。如果你不確定如何去做,最好的辦法就是從git獲取WX_3_0_BRANCH的最新消息。
  2. 通過在您的make命令行中添加CXXFLAGS=-std=gnu++11來構建C++ 11模式。如果你這樣做,記得在使用wxWidgets構建你的應用程序的時候也使用相同的標誌!