public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Jun Goo" <jun_goo@hotmail.com>
To: gcc-help@gcc.gnu.org
Subject: not finding header files...
Date: Wed, 07 Aug 2002 09:34:00 -0000	[thread overview]
Message-ID: <LAW2-F30q84Un3eWJEC00009f9c@hotmail.com> (raw)

dear gnu gurus,

i've just finished installing a copy of gcc 3.1.1 onto my computer and 
instead of replacing 2.96 (the previously installed version of gcc), i 
installed 3.1.1 under /usr/local (actual g++, gcj, g77, etc files under 
/usr/local/bin)

my problem is that although i can still compile files fine with the 2.96 
version (i.e. g++), i'm having problems when i try to compile with the 3.1.1 
version

for example, when i tried compiling the following (hello.cc):

#include <iostream>
using namespace std;

int main() {
  cout << "Hello World!" << endl;
  return 0;
}

with: g++ hello.cc

it still compiled fine when i used the 2.96 version but i got the following 
with 3.1.1:

hello.cc:1:20: iostream: No such file or directory
hello.cc: In function `int main()':
hello.cc:5: `cout' undeclared (first use this function)
hello.cc:5: (Each undeclared identifier is reported only once for each 
function
   it appears in.)
hello.cc:5: `endl' undeclared (first use this function)

i believe the header files for 3.1.1 are under /usr/include/g++-3 whereas 
for 2.96, they are under/usr/include/g++-2

so basically, my question is, is it possible for me to set up or reconfigure 
gcc 3.1.1 so that it correctly finds the necessary header files without my 
having to pass a flag/set of flags everytime? and if i am forced to pass a 
set of flags pointing to where the header files are, could someone tell me 
what they are?

i'm fairly new to linux so please forgive me if this problem is really 
trivial and thanks in advance for any help.

in case it's helpful, my computer is loaded up with the redhat 7.3 linux 
distribution and i didn't have any noticeable problems after running the gcc 
testsuite prior to installation.

-jun

_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx

             reply	other threads:[~2002-08-07 16:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-07  9:34 Jun Goo [this message]
     [not found] <616BE6A276E3714788D2AC35C40CD18D763077@whale.softwire.co.uk>
2002-08-07  9:54 ` Rupert Wood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=LAW2-F30q84Un3eWJEC00009f9c@hotmail.com \
    --to=jun_goo@hotmail.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=jun@alumni.carnegiemellon.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).