LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-24-2001, 07:01 PM   #1
kleric
LQ Newbie
 
Registered: Nov 2001
Location: Victoria, B.C
Distribution: Red Hat 6.0
Posts: 5

Rep: Reputation: 0
trouble with g++


I'm just starting to learn c++ and wrote a simple hello world program but when I try to compile, it outputs this:

<command line>: warning: "cpu" re-asserted
<command line>: warning: "machine" re-asserted
first.cpp:3:22: iostream.h: No such file or directory

I have no idea what this means, nor can I find any useful documentation on it anywhere on the web.
Does anyone know what's going on here? I desperately need to get my c++ compiler working...
 
Old 11-25-2001, 11:39 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
no idea what the first bit means, but on my md81 distro iostream.h isn't on the default include path, which is a bugger. try using a printf statement rather than a cout / cin thing (assuming you are) to compile, if that works, then it's just the include paths to worry about
 
Old 11-28-2001, 05:18 PM   #3
kleric
LQ Newbie
 
Registered: Nov 2001
Location: Victoria, B.C
Distribution: Red Hat 6.0
Posts: 5

Original Poster
Rep: Reputation: 0
<command line>: warning: "cpu" re-asserted ??

Can anyone make any sense of this and glean any clues as to why I can't compile any c++ programs?

#g++ first.cpp -v

Using builtin specs.
gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
cpp -lang-c++ -v -undef -D_GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=91 -D_ELF__ -Dunix -Di386__ -Dlinux -D__ELF -D__unix__ -D__i386 -D__i386__ -D__linux__ -D__unix -D__i386 -D__linux -Asystem(posix) -D__EXCEPTIONS -Asystem(unix) -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ first.cpp /tmp/ccfIUnbz.ii
Reading specs from /usr/lib/gcc-lib/i386-pld-linux/3.0.1/specs
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --enable-shared --enable-threads=posix --enable-haifa --enable-languages=c,c++,f77,gcov,java,objc --enable-long-long --enable-namespaces --enable-multilib --with-gnu-as --with-gnu-ld --with-system-zlib --with-slibdir=/lib --without-x i386-pld-linux
Thread model:posix
gcc version 3.0.1
/usr/lib/gcc-lib/i386-pld-linux/3.0.1/cpp0 -lang-c++ -D__GXX_DEPRECATED -D__EXCEPTIONS -D__GXX_ABI_VERSION=100 -v -D_NO_INLINE__ -D__STDC_HOSTED__=1 -D_GNU_SOURCE -Acpu=i386 -Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i386__ -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=91 -D__ELF__ -Dunix -Di386 -D__i386__ -Dlinux -D__ELF__ -D__unix__ -D__i386__ -D__i386__ -D__linux__ -D__unix -D__i386 -D__linux -Asystem(posix) -D__EXCEPTIONS -Asystem(unix) -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ first.cpp -o /tmp/ccfIUnbz.ii
GNU CPP version 3.0.1 (cpplib) (i386 Linux/ELF)
ignoring nonexistent directory "/usr/include/g++-v3"
ignoring nonexistent directory "/usr/include/g++-v3/i386-pld-linux"
ignoring nonexistent directory "/usr/include/g++-v3/backward"
ignoring nonexistent directory "/usr/i386-pld-linux/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/usr/lib/gcc-lib/i386-pld-linux/3.0.1/include
/usr/include
End of search list.

<command line>: warning: "cpu" re-asserted
<command line>: warning: "machine" re-asserted
first.cpp:3:24: iostream.h: No such file or directory
 
Old 11-30-2001, 10:29 AM   #4
gui10
Member
 
Registered: Mar 2001
Distribution: enigma, slack8
Posts: 677

Rep: Reputation: 30
i can't make sense of almost all of the error messages... in fact i only understand one
perhaps the most crucial one (unless a gcc/g++ guru deigns to come down from his ivory tower and explain to you otherwise) is the last line of your post...

as acid kewpie guessed rightly, your iostream.h file is not present in your include directory on your installation...

so... it's time to either upgrade your rh6.0 to something more recent (since the later versions of the rh distro has more recent versions of gcc/g++) or go download latest gcc/g++ compiler and install it on your box...

or you could try doing this: :smash:

good luck!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
x trouble mithereal Debian 1 08-25-2005 12:56 PM
trouble% rawinn Linux - Software 3 02-27-2004 01:24 AM
trouble ahead, trouble behind....trouble with mplayer Goonie Linux - Software 3 07-02-2003 02:29 AM
I'm in trouble GT I.N.C Linux - Newbie 123 10-13-2002 02:29 PM
Kernel Trouble (Not actually trouble though) chem1 Linux - General 4 10-01-2002 01:10 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration