Fedora Linux Support Community & Resources Center
  #1  
Old 22nd May 2004, 08:44 PM
katana Offline
Registered User
 
Join Date: May 2004
Location: Edinburgh, Scotland
Posts: 9
GCC problems

Sorry for the real newbie questions, but I have another.
I'm having errors using the ./configure command to install a package. It says my c compiler cannot create executables. I decided to test my gcc compiler by writing a simple "hello world" c++ program, and this was the output I got:
[root@localhost test]# g++ -o mytest mytest.cpp
mytest.cpp:1:22: iostream.h: No such file or directory
mytest.cpp: In function `int main()':
mytest.cpp:4: error: `cout' undeclared (first use this function)
mytest.cpp:4: error: (Each undeclared identifier is reported only once for each
function it appears in.)
mytest.cpp:4: error: `endl' undeclared (first use this function)

can anyone tell me what is wrong?
cheers
Darren.
Reply With Quote
  #2  
Old 22nd May 2004, 09:02 PM
sebnukem's Avatar
sebnukem Offline
Registered User
 
Join Date: May 2004
Location: Colorado
Age: 40
Posts: 159
If you're going to compile, you probably should install all the RPMs listed as Development packages because they will install all the header files (iostream.h included).
Reply With Quote
  #3  
Old 24th May 2004, 03:07 AM
Jman Offline
Registered User
 
Join Date: Mar 2004
Location: Minnesota, USA
Age: 27
Posts: 7,909
Did you install the Development Tools in the Development category? Main Menu > System Settings > Add/Remove Applications if not.
Reply With Quote
  #4  
Old 25th May 2004, 06:37 PM
wolveso Offline
Registered User
 
Join Date: May 2004
Location: Leeds, UK
Posts: 45
also, it'd be a good idea to change

#include <iostream.h>

in your c++ program, to

#include <iostream>
using namespace std;

as the use of the .h extension for including iostream is deprecated.. but as they say, you need to install the header files first : )
Reply With Quote
Reply

Tags
gcc, problems

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
codec problems, firefox problems.... am in trouble!!!!!!!!!!!!! Dninja Using Fedora 3 23rd July 2008 04:56 PM
Wifi Problems, BCM4312. Connection problems jackbrennan7757 Hardware & Laptops 4 18th January 2008 08:32 PM
Stupid nOOb with boot up problems, internet problems...the works. phearthepenguin Servers & Networking 30 23rd August 2006 05:33 PM
Firefox problems and problems with Laptop sound card. j_villa1983 Hardware & Laptops 3 22nd August 2006 05:54 AM
How to debug suspend problems? Buggy kernel option parsing? SATA problems? chrismon Using Fedora 0 11th August 2006 04:31 PM


Current GMT-time: 03:09 (Sunday, 26-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat