Sunday, 15 May 2011

c++11 - How to choose a specific MinGW installation for eclipse CDT -



c++11 - How to choose a specific MinGW installation for eclipse CDT -

i using 32-bit eclipse cdt kelper manage piece of code, compile on command line not eclipse if utilize up-to-date c++11 feature. cdt tells me "-std=c++11" unrecognized.

after turning on verbose alternative in project properties\settings\tool settings, found eclipse cdt somehow chooses older version of mingw comes haskell platform 2013.2:

configured with: ../gcc-4.5.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 --disable-werror --build=mingw32 --prefix=/mingw thread model: win32 gcc version 4.5.2 (gcc) collect_gcc_options='-o0' '-g3' '-wall' '-c' '-fmessage-length=0' '-v' '-o' 'src\vaomp_bnb.o' '-shared-libgcc' '-mtune=i386' '-march=i386' c:/haskell platform/2013.2.0.0/mingw/bin/../libexec/gcc/mingw32/4.5.2/cc1plus.exe -quiet -v -iprefix c:\haskell platform\2013.2.0.0\mingw\bin\../lib/gcc/mingw32/4.5.2/ -dd ..\src\vaomp_bnb.cpp -quiet -dumpbase vaomp_bnb.cpp -mtune=i386 -march=i386 -auxbase-strip src\vaomp_bnb.o -g3 -o0 -wall -version -fmessage-length=0 -o c:\docume~1\ting\locals~1\temp\ccwnoh7i.s gnu c++ (gcc) version 4.5.2 (mingw32)

i searched so, , there similar question half year ago here. reply there setting environment variables , didn't solve problem.

in case, cdt can find mingw gcc, found wrong one. have installed tdm-gcc 64 bit gcc-4.8.1, , haskell platform. tdm-gcc has priority ,

gcc --version

on both dos , msys shows

gcc.exe (tdm64-2) 4.8.1

i don't know heuristic cdt utilize find toolchains. question is, how can tell cdt utilize gcc in specific location, e.g. c:/mingw?

note, can't uninstall haskell platform version of gcc need hp.

thanks,

i figured out. seems eclipse cdt not take tdm-gcc mingw 64-bit because eclipse 32-bit. picked 32-bit mingw can find, old version hp.

to verify this, installed java 1.7 64-bit, , downloaded 64-bit version of eclipse cdt (kelper). now, cdt automatically selects tdm-gcc 64 version of mingw gcc.

for in similar situation, 1 additional issue 64-bit cdt - mingw64 combination combination not build projects. no binary/executable files generated newly created helloworld c++ project (even though compilation ok). in case, changed build tool in project properties..\tool chain. cdt internal builder either of other 2 options (one gnu's , long name), , project can made generate exe files.

eclipse c++11 mingw cdt

No comments:

Post a Comment