I bet the solution to this question is very simple, but I'm wondering why I can't get gcc to compile my c++ 11 code.
EDIT: Code removed to simplify problem. Any program would replicate the same error.
I am using the gcc compiler 4.7 as downoaded here: https://code.google.com/p/mingw-builds/downloads/detail?name=x86_64-mingw32-gcc-4.7.0-release-c%2Cc%2B%2B%2Cfortran-sjlj.zip&can=2&q=.
The command I am using to compile is simply gcc Swamp.cpp -std=c++11
. The code only complains about c++ 11 stuff if I compile with gcc Swamp.cpp
.
To my eyes, the errors given by the compilation is garbage:
C:\Users\Owner\Documents\GitHub\CompetitiveProgramming\TestProject\CodeProject>gcc Swamp.cpp -std=c++11
C:\Users\Owner\AppData\Local\Temp\ccRKn67x.o:Swamp.cpp:(.text+0x67): undefined reference to `__gxx_personality_sj0'
C:\Users\Owner\AppData\Local\Temp\ccRKn67x.o:Swamp.cpp:(.text+0x30e): undefined reference to `__gxx_personality_sj0'
C:\Users\Owner\AppData\Local\Temp\ccRKn67x.o:Swamp.cpp:(.text+0x72e): undefined reference to `__gxx_personality_sj0'
C:\Users\Owner\AppData\Local\Temp\ccRKn67x.o:Swamp.cpp:(.text+0x78a): undefined reference to `std::cout'
…etc…