Login  Register

Re: Compilation problems with SUN CC

Posted by Andreas Spengler-2 on Feb 18, 2009; 7:15pm
URL: http://quantlib.414.s1.nabble.com/Compilation-problems-with-SUN-CC-tp12581p12594.html

Hi Luigi,

Luigi Ballabio schrieb:

> Looking at your command line:
>
>> libtool: compile:  CC -DHAVE_CONFIG_H -I. -I. -I../../ql -I../.. -I../..
>> -I/home/spenglan/local/include/boost-1_38
>> -erroff=wvarhidemem,hidevf,hidevfinvb,wbadinitl,badargtypel2w -errtags=yes
>> -KPIC -features=rtti -template=wholeclass -instances=global -g -xs -fast
>> -library=rwtools7,iostream,no%stlport4,Crun -xarch=v8plusa -fsimple=1 -mt
>> -Drindex=rindex -Dindex=index -D__solaris_sparc__ -O3 -c
>> exchangeratemanager.cpp  -KPIC -DPIC -o .libs/exchangeratemanager.o
>
> a likely candidate would be -template=wholeclass. I don't have a Solaris
> box available to check it, but if it tells the compiler to instantiate
> all methods in a template class instead of just the ones that are used,
> then it would cause the error above.  May you have a look at your
> compiler documentation and check whether the above works as I guessed
> (and if so, how can you specify the correct behavior instead?)

I should have guessed it. Unfortunately I somehow thought, that
memberwise comparison is added implicitly (like the copy constructor and
assignment operator are)...

I looked up this in the Sun compiler C++ user reference - and will try
it out tomorrow:

"When the compiler implicitly instantiates a template class, it
instantiates the static data members, the constructor, and the
destructor. However, the compiler does not implicitly instantiate any
other member function unless the function is explicitly referenced. To
force the compiler to instantiate all member functions when implicitly
instantiating a class, use the -template=wholeclass compiler option. To
turn this option off, specify -template=no%wholeclass, which is the
default."


Rgds,

Andreas

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev