This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: g++ vs gcc


"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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]