Skip to main content


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 15:31 Go to next message
Gabriel Ameen is currently offline Gabriel AmeenFriend
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 16:24 Go to previous messageGo to next message
Joost Kraaijeveld is currently offline Joost KraaijeveldFriend
Messages: 273
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


Cheers,

Joost
Re: C++ Build problem!!!!!!!!!!!! [message #721932 is a reply to message #721928] Sat, 03 September 2011 16:58 Go to previous messageGo to next message
Gabriel Ameen is currently offline Gabriel AmeenFriend
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 17:58 Go to previous messageGo to next message
Joost Kraaijeveld is currently offline Joost KraaijeveldFriend
Messages: 273
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


Cheers,

Joost
Re: C++ Build problem!!!!!!!!!!!! [message #721944 is a reply to message #721942] Sat, 03 September 2011 18:23 Go to previous messageGo to next message
Gabriel Ameen is currently offline Gabriel AmeenFriend
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] Sun, 27 November 2011 03:15 Go to previous message
Marco.Leise is currently offline Marco.LeiseFriend
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 Apr 23 17:37:59 GMT 2024

Powered by FUDForum. Page generated in 0.04738 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top