Eclipse CDT (Juno) in Win7: cannot find g ++ in PATH, iostream unresolved and other funny things

I come out of despair, you guys are my last hope.

I had problems in the name since yesterday, and for life I can not find what is wrong.

A simple hello world program cannot be built because Eclipse cannot find the g ++ compiler. I managed to find the PATH variable in Project-> Properties-> C ++ BuildEnvironment and set it to C:\Users\Dimitris\Documents\eclipseCPP\eclipse;C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\Windows Live\Shared;D:\Users\Dimitris\AppData\Local\Photran\MinGW\bin;C:\Program Files (x86)\VDownloader;E:\Program Files\VDownloader;E:\Program Files (x86)\FAHClient Obviously, something is wrong.

Regarding the “unresolved iostream” question, I tried setting up my included paths in Project-> Properties-> C / C ++ General-> Paths and Symbols-> Include tab, and then adding the whole MinGW file system helped. Surprisingly, the addition of the MinGW subtree, namely the iostream level itself, was prevented to make Eclipse see iostream, although the program still could not understand cout or std. I have MinGW, Cygwin and cygnus installed.

The program, as I said, is a world of welcome. It will not be created.

 #include <iostream> using namespace std; int main() { cout << "!!!Hello World!!!" << endl; // prints !!!Hello World!!! return 0; } 
0
source share
1 answer

Do you have g++.exe in your PATH? (I see that you have D:\Users\Dimitris\AppData\Local\Photran\MinGW\bin in your path. Is there g++.exe ?)

If you go to the command prompt ( cmd.exe ) and type g++ -v enter , will it find gcc and print the version?

Another thing is how you created your project?

If you choose File -> New -> C++ project -> Hello World , and your gcc compiler is on your way, you should be good to go.

This is the result of a simple Hello world project created using the above method.

** Build configuration Debugging for foobar project **

to do everything

Building File: ../ src / foobar.cpp

Call: GCC C ++ Compiler

g ++ -O0 -g3 -Wall -c -fmessage-length = 0 -MMD -MP -MF "src / foobar.d" -MT "src / foobar.d" -o "src / foobar.o" "../ src / foobar.cpp "

Finished building: ../ src / foobar.cpp

Purpose of construction: foobar Call: GCC C ++ Linker g ++ -o "foobar". /src/foobar.o

The ultimate goal of the building: foobar

** Ready to complete **

+1
source

All Articles