This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Finding compiler
- From: Claudio Bley <bley at cs dot uni-magdeburg dot de>
- To: gcc-help at gcc dot gnu dot org
- Date: Mon, 7 Jul 2003 02:11:17 +0200
- Subject: Re: Finding compiler
- References: <3F072095.5090207@bellsouth.net>
On Sat, Jul 05, 2003 at 02:01:41PM -0500, Joseph Felps wrote:
> This is the error I get:
>
> You must set the environment variable CC to a working compiler.
>
> Here's what I did. I compiled and installed gcc-3.3 to /usr/local/gcc-3.3/
> I then uninstalled the compiler that comes with debian, which is gcc
> 2.95. Now i tried to get this set up right so CC would look to gcc-3.3
> with update-alternatives, but I have been unable to figure it out. I
> understand the error but I don't know how to fix it.
I think you're confusing setting a environment variable with the
Debian specific alternatives mechanism. You have several choices here:
a) Do as advised and set (e.g. in your ~/.bashrc or system-wide
/etc/bash.bashrc) the environment variable CC to a working compiler =>
export CC=/usr/local/gcc-3.3/bin/gcc
b) adjust your PATH variable so your shell can find the executables =>
export PATH="/usr/local/gcc-3.3/bin:$PATH"
c) Use the alternatives system and add /usr/local/gcc-3.3/bin/gcc as
an alternative for something (eg. `c-compiler'? Or `cc' for that
matter) =>
update-alternatives --install /usr/bin/gcc <name> \
/usr/local/gcc-3.3/bin/gcc 100
(if you're not using BASH just adapt a and b accordingly)
PS.: I think you should've really ask this elsewhere. It is a bit off
topic.
HTH
--
Claudio Bley ASCII ribbon campaign (")
Debian GNU/Linux user - against HTML email X
http://www.cs.uni-magdeburg.de/~bley/ & vCards / \