This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: g++ vs gcc
- From: LLeweLLyn Reese <llewelly at lifesupport dot shutdown dot com>
- To: "William Trenker" <wtrenker at hotmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: 22 Dec 2002 20:55:58 -0800
- Subject: Re: g++ vs gcc
- References: <F69YdRGy9tCx1Dy3riC000042fe@hotmail.com>
- Reply-to: gcc-help at gcc dot gnu dot org
"William Trenker" <wtrenker@hotmail.com> writes:
> Can someone explain where the CXX variable gets set on a typical Linux
> / GCC development system?
>
> For example, one of the 3rd party libraries I regularly build from cvs
> contains a makeinclude file that has these lines:
> CC = gcc
> CXX = gcc
>
> The corresponding makeinclude.in file contains these lines:
> CC = @CC@
> CXX = @CXX@
>
> Where does @CXX@ get defined
The configure scrict does some tests to figure it out. These tests
vary somewhat from project to project, but the autoconf provided
defaults are (more or less):
If the CXX environment variable is set, and executable use $(CXX)
If the CCC environment variable is set, and executable, use $(CCC)
Next it checks 'g++', and 'c++'.
If you want to control it, set CXX in your shell:
$export CXX=/usr/local/gcc-3.2.1/bin/g++
(for example)
> The config.log file shows this:
> CC='gcc'
> CPP='gcc -E'
> CXX='gcc'
>
> Since the CXX variable is not set to g++ could it be that I don't have
> all the configuration details worked out yet from my recent switchover
> to GCC 3.2? Or is this something that needs sorting out in the
> 3rd-party libraries' configuration files?
[snip]
Possibly the latter, but try setting your CXX environment variable.