This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Using multiple compilers
- From: "J.B. Brown" <brownie at csserver dot evansville dot edu>
- To: gcc at gnu dot org
- Cc: ibitter at cc dot nih dot gov, <jebrown at cc dot nih dot gov>
- Date: Wed, 30 Jul 2003 17:46:15 -0500 (CDT)
- Subject: Using multiple compilers
Hello, and thank you for your time.
I have a question regarding multiple builds of GCC on the same machine. I
am not the system administrator on a supercomputing cluster used at the
National Institutes of Health (NIH), but have access to the cluster. It
is a Red-Hat Linux based cluster, with an older version of GCC (2.9 or
so). I downloaded and successfully built GCC 3.3 . However, I am not
sure how to tell programs (namely compilers and make environments) to use
the newly built 3.3 include files and libraries, instead of the old 2.9
libraries.
For example, if I have hello.cpp:
#include <iostream>
int main(){cout << "hello";return 0;}
I want it to use the include files from GCC 3.3 (locally at
/data/pkg/gcc/include, and not from 2.9, which
are installed at /usr/include on this particular system). This is true
not only for iostream, but all of the standard includes and libraries.
Specifying the -I/<dirname> was not successful.
Can you tell me how to either
a) modify my environment to no longer point to /usr/include and to my
directory instead,
b) recompile GCC 3.3 again with a flag to specify where the includes and
libraries are, or
c) Define some sort of symlink for my account to reference my GCC
directory and not the default GCC directory?
Any and all help is greatly appreciated!
Sincerely,
J.B. Brown