http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52978
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-04-13 17:34:10 UTC --- (In reply to comment #0) > I compiled the code with the following statement: > gcc -Wall -Wextra -save-temps -lstdc++ main.cpp Also if you use g++ you don't need to link to libstdc++ g++ -Wall -Wextra -save-temps main.cpp