[Coin-symphony] How to change the compiler?

Ted Ralphs tkralphs at lehigh.edu
Thu Jan 18 11:52:02 EST 2007


If I had to recommend a compiler, I would say gcc 4 is the best bet,
since that is the one I use most of the time :). The problem may not be
the compiler, it may just be that you are rebuilding in the same
directory in which you built code with the old compiler. Try

make distclean
configure CXX=gcc4
make

Alternatively, you could just start again by checking out a fresh copy.
In that case, I would recommend using what is called a VPATH build. To
do so, from the SYMPHONY root directory, do the following:

mkdir build-gcc4
cd build-gcc4
../configure CXX=gcc4
make

If you want to start over, you can just delete the build-gcc4
subdirectory and begin again. Also, to build with a different
configuration (while leaving the other one in place, you can just do
something like

mkdir build-cc
cd build-cc
../configure CXX=cc
make

Hope this helps!

Cheers,

Ted


Goehring wrote:
> Hi Ted,
> 
> Thanks! 
> 
> I tried
>> configure CXX=gcc4
>> make.
> 
> Make runs fine till it
> results in the linker error message of the following (many undefined
> references):
> 
> ...
> gcc4 -O3 -fomit-frame-pointer -pipe -DNDEBUG -pedantic-errors -Wimplicit
> -Wparentheses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-
> strings -Wconversion -o .libs/clp ClpMain.o CbcOrClpParam.o
> MyEventHandler.o MyMessageHandler.o
> unitTest.o  ./.libs/libClp.so /afs/uni-
> hohenheim.de/project/mas/Users/lgoehrin/SYMPHONY-5.1/Clp/../CoinUtils/src/.libs/libCoinUtils.so -lm -Wl,--rpath -Wl,/afs/uni-hohenheim.de/project/mas/Users/lgoehrin/SYMPHONY-5.1/lib
> ClpMain.o(.text+0x20): In function
> `__static_initialization_and_destruction_0(int, int)':
> : undefined reference to `std::ios_base::Init::Init()'
> ClpMain.o(.text+0xbf): In function `breakdown(char const*, int, double
> const*)':
> : undefined reference to `operator new[](unsigned int)'
> ClpMain.o(.text+0xe5): In function `breakdown(char const*, int, double
> const*)':
> : undefined reference to `operator new[](unsigned int)'
> ...
> 
> Is there a compiler type or a gnu compiler version which can be
> (strongly) recommended?
> 
> Cheers,
> 
> Lutz
> 
> 
> 
> 
>  On Wed, 2007-01-17 at 18:16 -0500, Ted Ralphs wrote:
>> Hi Lutz,
>>
>> To specify a different compiler named "cc", just invoke configure as
>> follows:
>>
>> configure CXX=cc
>>
>> That should do it.
>>
>> Cheers,
>>
>> Ted


-- 
Dr. Ted Ralphs
Associate Professor
Industrial and Systems Engineering
Lehigh University
(610)758-4784
tkralphs at lehigh.edu
www.lehigh.edu/~tkr2



More information about the Symphony mailing list