Newbie problem: C / C ++ with Eclipse
My setup includes: Windows Vista, Eclipse 3.5.0 and gdb, make, gcc 3.4.4, g ++ 3.4.4 are enabled via Cygwin and the environment variable is already set.
My FIRST problem is that I can launch and build an application similar to the information in the console:
**** Build of configuration Debug for project HelloWorld ****
make all <br />
Building file: ../src/HelloWorld.cpp <br />
Invoking: Cygwin C++ Compiler <br />
g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/HelloWorld.d" <br /> -MT"src/HelloWorld.d" -o"src/HelloWorld.o" "../src/HelloWorld.cpp" <br />
Finished building: ../src/HelloWorld.cpp <br />
Building target: HelloWorld.exe <br />
Invoking: Cygwin C++ Linker <br />
g++ -o"HelloWorld.exe" ./src/HelloWorld.o <br />
Finished building target: HelloWorld.exe <br />
But in the Problems view, I still have the following warnings:
Error launching external scanner info generator (g++ -E -P -v -dD F:/workspace/.metadata/.plugins/org.eclipse.cdt.make.core/specs.cpp) <br />
Error launching external scanner info generator (g++ -E -P -v -dD F:/workspace/.metadata/.plugins/org.eclipse.cdt.make.core/specs.cpp) <br />
Error launching external scanner info generator (gcc -E -P -v -dD F:/workspace/.metadata/.plugins/org.eclipse.cdt.make.core/specs.c) <br />
Error launching external scanner info generator (gcc -E -P -v -dD F:/workspace/.metadata/.plugins/org.eclipse.cdt.make.core/specs.c)
My second problem is that I have set the PATH but I cannot run " g++ --version
" and " gcc --version
" in windows command whereas "make", "gdb", "gcc-3" and "gcc-3", g ++ - 3 '.
Does anyone know what I can do to fix these problems? Is the second problem related to the first problem?
thank
Hank
source to share
I'm sure your second problem could very well be related to your first problem:
From this thread :
Make sure gcc is installed and on your PATH.
This other thread states the obvious:
a
PATH
env var change via OS GUI will not work in an already running application (Eclipse), including an already open console window.
If you restart Eclipse after changing the PATH, you are not doing it from an existing console window, are you?
Also try copying the executablegcc.exe
toc:\WINNT
as a test. It won't work autonomously, but you should at least see some difference to help you determine if your problem is indeed the PATH.
For cygwin environment other hacks are possible :
Recent versions of Cygwin no longer have gcc.exe or g ++. exe. These files have been replaced with .lnk files that point to gcc-3.exe and g ++ - 3.exe (or whatever)
Some tools in Eclipse need to run "gcc" or "g ++" to generate some information. The OS cannot find gcc.exe or g ++ exe and therefore returns an error.
I found the following procedure worked for me:
1 / remove gcc.exe.lnk and g ++. Exe.lnk from cygwin / bin
2 / Copy gcc-3.exe to gcc.exe
3 / Copy g ++ - 3.exe to g ++. Exe
Remember there are:
- is an open bug (221992) reporting this message appearing at varying intervals.
- is a fixed bug (225272) Problems with the manufacturer and fast (Dual Core) machines that may affect this issue (so which version of CDT are you using? I suspect you are not concerned about this)
- one solution, if the problem does persist, would be to replace the spawner.dll with an earlier version (from CDT 4.0.3)
source to share