c++ - Including <map> causes compilation error with g++ 4.6.2 -
i'm getting strange compilation error, cannot explain. following code minimal example, getting me error:
#include <map> int main() { return 0; }
the problem is, i'm gettin error because of including map-header file:
p:\mingw\bin\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_map.h:109:15: error: 'map' not template p:\mingw\bin\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_map.h:162:48: error: declarations of constructors can 'explicit' p:\mingw\bin\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_map.h:172:17: error: 'map' not name type p:\mingw\bin\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_map.h:252:7: error: 'map' not name type p:\mingw\bin\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_map.h:693:12: error: 'map' not type p:\mingw\bin\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_map.h:856:26: error: 'map<_k1, _t1, _c1, _a1>' not name type p:\mingw\bin\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_map.h:857:12: error: 'map<_k1, _t1, _c1, _a1>' not name type ...
this goes on , on (100s of such errors). don't have problem including other c++ headers (like string, vector etc).
i've tried finding via google, without success. have idea can cause problem this?
if helps: i'm using windows 7, , running 'g++ -v' outputs:
using built-in specs. collect_gcc=g++ collect_lto_wrapper=p:/mingw/bin/../libexec/gcc/mingw32/4.6.2/lto-wrapper.exe target: mingw32 configured with: ../gcc-4.6.2/configure --enable-languages=c,c++,ada,fortran,objc,obj-c++ --disable-sjlj-exceptions --with-dwarf2 --enable-shared --enable-libgomp --disable-win32-registry --enable-libstdcxx-debug --enable-version-specific-runtime-libs --build=mingw32 --prefix=/mingw thread model: win32 gcc version: 4.6.2 (gcc)
Comments
Post a Comment