./configure with a specified version of g++

Oodini picture Oodini · Apr 12, 2010 · Viewed 19.7k times · Source

How to tell to a 'configure' file to compile with a specified version of g++ ?

Thanks.

Answer

Dan Olson picture Dan Olson · Apr 12, 2010

In a bash shell you can do something like this:

./configure CC=gcc-2.95

There will be similar techniques for other shells but I couldn't help you with the specifics. If your project is C++ the variable you need to define is CXX.