Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » C++ Build problem!!!!!!!!!!!!
C++ Build problem!!!!!!!!!!!! [message #721916] Sat, 03 September 2011 11:31 Go to next message
Gabriel Ameen is currently offline Gabriel Ameen
Messages: 4
Registered: September 2011
Junior Member
Hi friends,
I facing a problem with Eclipse IDE and MinGW, hope you will help me out. This is how I installed eclipse.
1. I installed JRE.
2. I donwloaded the MinGW automatic installer, installed everything except Fortran compiler, under C:\MinGW
3. Then I added C:\MinGW\bin to my system path variable.
4. Then I downloaded Eclipse IDE for C/C++ Developers (includes Incubating components), extracted it under C:\eclipse

Now when I create a c project, with .c source file, the build is successfuly done, and I can run the executable created. But when I try to do the same thing with a c++ project, I face the following errors.

Description	                        Resource         Path   Location             	                               	
Symbol 'cout' could not be resolved	First.cpp	/First/src	line 13	Semantic Error
Symbol 'endl' could not be resolved	First.cpp	/First/src	line 13	Semantic Error
Symbol 'std' could not be resolved	First.cpp	/First/src	line 10	Semantic Error
Error launching external scanner info generator (g++ -E -P -v -dD C:/Users/dawood/workspace/.metadata/.plugins/org.eclipse.cdt.make.core/specs.cpp)	First		[Discovery Options] page in project properties	C/C++ Problem
Program 'g++' is not found in $PATH	First		[Discovery Options] page in project properties	C/C++ Problem


I searched for the iostream under C:\MinGW but couldn't find, why is iostream not included with MinGW???
I am running Windows 7 x64 Ultimate SP1, please help me with this! Looking forward to your replies!
Thanks in advance!


Re: C++ Build problem!!!!!!!!!!!! [message #721928 is a reply to message #721916] Sat, 03 September 2011 12:24 Go to previous messageGo to next message
Joost Kraaijeveld is currently offline Joost Kraaijeveld
Messages: 173
Registered: July 2009
Senior Member
On 03/09/11 17:31, Gabriel Ameen wrote:
> successfuly done, and I can run the executable created. But when I try
> to do the same thing with a c++ project, I face the following errors.
What is the extension of the C++ file?

> Description Resource Path
> Location
> Symbol 'cout' could not be resolved First.cpp /First/src line
> 13 Semantic Error
> Symbol 'endl' could not be resolved First.cpp /First/src line
> 13 Semantic Error
> Symbol 'std' could not be resolved First.cpp /First/src line
> 10 Semantic Error
What namespace is imported (if any)?

Joost
Re: C++ Build problem!!!!!!!!!!!! [message #721932 is a reply to message #721928] Sat, 03 September 2011 12:58 Go to previous messageGo to next message
Gabriel Ameen is currently offline Gabriel Ameen
Messages: 4
Registered: September 2011
Junior Member
Quote:
What is the extension of the C++ file?

It is .cpp

Quote:
What namespace is imported (if any)?
I didn't get this part of your question, I am giving all the code for your information.

#include <iostream>
using namespace std;
int main()
{
     cout << "Hello, world!\n";
     return 0;
}
Re: C++ Build problem!!!!!!!!!!!! [message #721942 is a reply to message #721932] Sat, 03 September 2011 13:58 Go to previous messageGo to next message
Joost Kraaijeveld is currently offline Joost Kraaijeveld
Messages: 173
Registered: July 2009
Senior Member
From your previous mail:

> Program 'g++' is not found in $PATH First [Discovery
> Options] page in project properties C/C++ Problem

Did you look at this? Is g++ installed and in the path?

Joost
Re: C++ Build problem!!!!!!!!!!!! [message #721944 is a reply to message #721942] Sat, 03 September 2011 14:23 Go to previous messageGo to next message
Gabriel Ameen is currently offline Gabriel Ameen
Messages: 4
Registered: September 2011
Junior Member
Joost Kraaijeveld wrote on Sat, 03 September 2011 13:58
From your previous mail:

> Program 'g++' is not found in $PATH First [Discovery
> Options] page in project properties C/C++ Problem

Did you look at this? Is g++ installed and in the path?

Joost


Somehow after reinstalling my problem has been solved, but now another problem rises. printf gives console display, while cout doesn't!
Re: C++ Build problem!!!!!!!!!!!! [message #759157 is a reply to message #721944] Sat, 26 November 2011 22:15 Go to previous message
Marco.Leise is currently offline Marco.Leise
Messages: 1
Registered: August 2011
Junior Member
Write

cout << "Hello, world!" << endl;

endl will flush the buffer.
Previous Topic:[SOLVED] Errors from eclipse cdt core on startup, even after fresh install
Next Topic:How to build a project with "./configure && make"
Goto Forum:
  


Current Time: Tue Jul 29 21:12:39 EDT 2014

Powered by FUDForum. Page generated in 0.05078 seconds