I'm writing a program that uses the preprocessor library <random>, but when I try to debug the compiler tells me this error:
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
I know that is not a CodeLite problem, but you know what I need to do to enable C + +11 support?
Thanks in advance
C++11 Support
- Mograine
- CodeLite Curious
- Posts: 6
- Joined: Mon Dec 16, 2013 7:52 am
- Genuine User: Yes
- IDE Question: C++
C++11 Support
CodeLite 5.4
MinGW 4.8.1
Windows 7
MinGW 4.8.1
Windows 7
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: C++11 Support
Hello,
First of all, please provide some more information about your environment, build log etc as described in the HOW TO POST thread
Try adding the flag
From: project settings -> Common Settings -> Compiler -> C++ Compiler options
Eran
First of all, please provide some more information about your environment, build log etc as described in the HOW TO POST thread
Try adding the flag
Code: Select all
-std=c++11
Eran
Make sure you have read the HOW TO POST thread
- Mograine
- CodeLite Curious
- Posts: 6
- Joined: Mon Dec 16, 2013 7:52 am
- Genuine User: Yes
- IDE Question: C++
Re: C++11 Support
I did as suggested, and now the compiler tells me these errors:
CodeLiteDir=C:\Program Files\CodeLite
UNIT_TEST_PP_SRC_DIR=C:\UnitTest++-1.3
WXWIN=C:\wxWidgets-3.0.0
WXCFG=gcc_dll\mswu
PATH=C:\MinGW\bin;$PATH
Code: Select all
C:\Windows\system32\cmd.exe /c "mingw32-make.exe -j 4 -e -f Makefile"
"----------Building project:[ foobar - Debug ]----------"
mingw32-make.exe[1]: Entering directory 'C:/UnitTest++-1.3/foobar'
g++ -o ./Debug/foobar @"foobar.txt" -L. -mthreads -LC:/wxWidgets-3.0.0/lib/gcc_dll -lwxmsw30ud_xrc -lwxmsw30ud_aui -lwxmsw30ud_html -lwxmsw30ud_adv -lwxmsw30ud_core -lwxbase30ud_xml -lwxbase30ud_net -lwxmsw30ud_richtext -lwxbase30ud -lwxtiffd -lwxjpegd -lwxpngd -lwxzlibd -lwxregexud -lwxexpatd -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwxregexud -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -mwindows
./Debug/foobar_app.o: In function `Z11wxCreateAppv':
C:/UnitTest++-1.3/foobar/foobar_app.cpp:7: undefined reference to `__gxx_personality_sj0'
C:/UnitTest++-1.3/foobar/foobar_app.cpp:7: undefined reference to `_Unwind_SjLj_Register'
C:/UnitTest++-1.3/foobar/foobar_app.cpp:7: undefined reference to `_Unwind_SjLj_Resume'
C:/UnitTest++-1.3/foobar/foobar_app.cpp:7: undefined reference to `_Unwind_SjLj_Unregister'
./Debug/foobar_app.o: In function `ZN9FoobarApp6OnInitEv':
C:/UnitTest++-1.3/foobar/foobar_app.cpp:18: undefined reference to `__gxx_personality_sj0'
C:/UnitTest++-1.3/foobar/foobar_app.cpp:18: undefined reference to `_Unwind_SjLj_Register'
C:/UnitTest++-1.3/foobar/foobar_app.cpp:20: undefined reference to `_Unwind_SjLj_Resume'
C:/UnitTest++-1.3/foobar/foobar_app.cpp:22: undefined reference to `_Unwind_SjLj_Resume'
C:/UnitTest++-1.3/foobar/foobar_app.cpp:23: undefined reference to `_Unwind_SjLj_Resume'
C:/UnitTest++-1.3/foobar/foobar_app.cpp:24: undefined reference to `_Unwind_SjLj_Resume'
C:/UnitTest++-1.3/foobar/foobar_app.cpp:25: undefined reference to `_Unwind_SjLj_Resume'
./Debug/foobar_app.o:C:/UnitTest++-1.3/foobar/foobar_app.cpp:26: more undefined references to `_Unwind_SjLj_Resume' follow
./Debug/foobar_app.o: In function `ZN9FoobarApp6OnInitEv':
C:/UnitTest++-1.3/foobar/foobar_app.cpp:32: undefined reference to `_Unwind_SjLj_Unregister'
./Debug/foobar_app.o: In function `ZN8wxStringC1EPKw':
C:/wxWidgets-3.0.0/include/wx/string.h:1267: undefined reference to `__gxx_personality_sj0'
C:/wxWidgets-3.0.0/include/wx/string.h:1267: undefined reference to `_Unwind_SjLj_Register'
C:/wxWidgets-3.0.0/include/wx/string.h:1268: undefined reference to `_Unwind_SjLj_Resume'
C:/wxWidgets-3.0.0/include/wx/string.h:1268: undefined reference to `_Unwind_SjLj_Unregister'
./Debug/foobar_app.o: In function `ZN8wxString5eraseEjj':
C:/wxWidgets-3.0.0/include/wx/string.h:2840: undefined reference to `__gxx_personality_sj0'
C:/wxWidgets-3.0.0/include/wx/string.h:2840: undefined reference to `_Unwind_SjLj_Register'
C:/wxWidgets-3.0.0/include/wx/string.h:2848: undefined reference to `_Unwind_SjLj_Resume'
C:/wxWidgets-3.0.0/include/wx/string.h:2848: undefined reference to `_Unwind_SjLj_Unregister'
./Debug/foobar_app.o: In function `ZN14wxImageHandlerC2Ev':
C:/wxWidgets-3.0.0/include/wx/image.h:107: undefined reference to `__gxx_personality_sj0'
C:/wxWidgets-3.0.0/include/wx/image.h:107: undefined reference to `_Unwind_SjLj_Register'
C:/wxWidgets-3.0.0/include/wx/image.h:108: undefined reference to `_Unwind_SjLj_Resume'
C:/wxWidgets-3.0.0/include/wx/image.h:108: undefined reference to `_Unwind_SjLj_Unregister'
./Debug/foobar_app.o: In function `ZN14wxImageHandlerD2Ev':
C:/wxWidgets-3.0.0/include/wx/image.h:104: undefined reference to `__gxx_personality_sj0'
C:/wxWidgets-3.0.0/include/wx/image.h:104: undefined reference to `_Unwind_SjLj_Register'
C:/wxWidgets-3.0.0/include/wx/image.h:104: undefined reference to `_Unwind_SjLj_Resume'
C:/wxWidgets-3.0.0/include/wx/image.h:104: undefined reference to `_Unwind_SjLj_Unregister'
./Debug/foobar_app.o: In function `ZN12wxBMPHandlerC2Ev':
C:/wxWidgets-3.0.0/include/wx/imagbmp.h:45: undefined reference to `__gxx_personality_sj0'
C:/wxWidgets-3.0.0/include/wx/imagbmp.h:45: undefined reference to `_Unwind_SjLj_Register'
C:/wxWidgets-3.0.0/include/wx/imagbmp.h:46: undefined reference to `_Unwind_SjLj_Resume'
C:/wxWidgets-3.0.0/include/wx/imagbmp.h:46: undefined reference to `_Unwind_SjLj_Unregister'
./Debug/foobar_app.o: In function `ZN12wxICOHandlerC2Ev':
C:/wxWidgets-3.0.0/include/wx/imagbmp.h:79: undefined reference to `__gxx_personality_sj0'
C:/wxWidgets-3.0.0/include/wx/imagbmp.h:79: undefined reference to `_Unwind_SjLj_Register'
C:/wxWidgets-3.0.0/include/wx/imagbmp.h:80: undefined reference to `_Unwind_SjLj_Resume'
C:/wxWidgets-3.0.0/include/wx/imagbmp.h:80: undefined reference to `_Unwind_SjLj_Unregister'
./Debug/foobar_app.o: In function `ZN12wxICOHandlerC1Ev':
C:/wxWidgets-3.0.0/include/wx/imagbmp.h:79: undefined reference to `__gxx_personality_sj0'
C:/wxWidgets-3.0.0/include/wx/imagbmp.h:79: undefined reference to `_Unwind_SjLj_Register'
C:/wxWidgets-3.0.0/include/wx/imagbmp.h:80: undefined reference to `_Unwind_SjLj_Resume'
C:/wxWidgets-3.0.0/include/wx/imagbmp.h:80: undefined reference to `_Unwind_SjLj_Unregister'
./Debug/foobar_app.o: In function `ZN12wxCURHandlerC1Ev':
C:/wxWidgets-3.0.0/include/wx/imagbmp.h:109: undefined reference to `__gxx_personality_sj0'
C:/wxWidgets-3.0.0/include/wx/imagbmp.h:109: undefined reference to `_Unwind_SjLj_Register'
C:/wxWidgets-3.0.0/include/wx/imagbmp.h:110: undefined reference to `_Unwind_SjLj_Resume'
C:/wxWidgets-3.0.0/include/wx/imagbmp.h:110: undefined reference to `_Unwind_SjLj_Unregister'
./Debug/foobar_app.o: In function `ZN12wxPNGHandlerC1Ev':
C:/wxWidgets-3.0.0/include/wx/imagpng.h:42: undefined reference to `__gxx_personality_sj0'
C:/wxWidgets-3.0.0/include/wx/imagpng.h:42: undefined reference to `_Unwind_SjLj_Register'
C:/wxWidgets-3.0.0/include/wx/imagpng.h:43: undefined reference to `_Unwind_SjLj_Resume'
C:/wxWidgets-3.0.0/include/wx/imagpng.h:43: undefined reference to `_Unwind_SjLj_Unregister'
./Debug/foobar_app.o: In function `ZN12wxGIFHandlerC1Ev':
C:/wxWidgets-3.0.0/include/wx/imaggif.h:30: undefined reference to `__gxx_personality_sj0'
C:/wxWidgets-3.0.0/include/wx/imaggif.h:30: undefined reference to `_Unwind_SjLj_Register'
C:/wxWidgets-3.0.0/include/wx/imaggif.h:31: undefined reference to `_Unwind_SjLj_Resume'
C:/wxWidgets-3.0.0/include/wx/imaggif.h:31: undefined reference to `_Unwind_SjLj_Unregister'
./Debug/foobar_app.o: In function `ZN12wxXPMHandlerC1Ev':
C:/wxWidgets-3.0.0/include/wx/imagxpm.h:23: undefined reference to `__gxx_personality_sj0'
C:/wxWidgets-3.0.0/include/wx/imagxpm.h:23: undefined reference to `_Unwind_SjLj_Register'
C:/wxWidgets-3.0.0/include/wx/imagxpm.h:24: undefined reference to `_Unwind_SjLj_Resume'
C:/wxWidgets-3.0.0/include/wx/imagxpm.h:24: undefined reference to `_Unwind_SjLj_Unregister'
collect2.exe: error: ld returned 1 exit status
mingw32-make.exe[1]: *** [Debug/foobar] Error 1
mingw32-make.exe: *** [All] Error 2
foobar.mk:82: recipe for target 'Debug/foobar' failed
mingw32-make.exe[1]: Leaving directory 'C:/UnitTest++-1.3/foobar'
Makefile:4: recipe for target 'All' failed
57 errors, 0 warnings
- Your codelite version: 5.3
Is it a self compiled version of codelite: no
Your OS: Windows 7
Compiler version: 4.8.1
CodeLiteDir=C:\Program Files\CodeLite
UNIT_TEST_PP_SRC_DIR=C:\UnitTest++-1.3
WXWIN=C:\wxWidgets-3.0.0
WXCFG=gcc_dll\mswu
PATH=C:\MinGW\bin;$PATH
CodeLite 5.4
MinGW 4.8.1
Windows 7
MinGW 4.8.1
Windows 7
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: C++11 Support
Since codelite 5.3 does not have GCC 4.8.1, I assume you installed it manually.Mograine wrote:Compiler version: 4.8.1
How did you compile your wxWidgets? It looks as if wxWidgets was compiled with a different compiler than your code
Eran
Make sure you have read the HOW TO POST thread
- Mograine
- CodeLite Curious
- Posts: 6
- Joined: Mon Dec 16, 2013 7:52 am
- Genuine User: Yes
- IDE Question: C++
Re: C++11 Support
Yes, the gcc/g++ version of CodeLite doesn't support C++11. I get wxWidgets from here, and I did not need to compile it
CodeLite 5.4
MinGW 4.8.1
Windows 7
MinGW 4.8.1
Windows 7
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: C++11 Support
This will be changed (hopefully) tomorrowMograine wrote:Yes, the gcc/g++ version of CodeLite doesn't support C++11
This is the version that I compiled with gcc 4.7.1 (note that 4.7.1 in the name)Mograine wrote:I get wxWidgets from here, and I did not need to compile it
2 weeks ago I uploaded another version of wxWidgets compiled with 4.8.1 (TDM/GCC) You can get it from here
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Curious
- Posts: 3
- Joined: Sat Jan 18, 2014 7:04 am
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: C++11 Support
Codelite 5.3 (gcc 4.7.1) supports quite a lot of C++11. http://gcc.gnu.org/gcc-4.7/cxx0x_status.htmlMograine wrote:Yes, the gcc/g++ version of CodeLite doesn't support C++11.
Codelite 5.4 (gcc 4.8.1) supports almost all of C++11. http://gcc.gnu.org/gcc-4.8/cxx0x_status.html