Compiling and linking with -instances=static gave me the following output: ld: fatal: symbol `RefHashTableOfEnumerator<DTDAttDef>::~RefHashTableOfEnumerator #Nvariant 1()' is multiply defined: (file /home/eyankowi/tmp/xerces-csrc_1_1_0_d05/obj/DTDAttDefList.o and file /home/eyankowi/tmp/xerces-csrc_1_1_0_d05/obj/DTDElementDecl.o); ld: fatal: File processing errors. No output written to /home/eyankowi/tmp/xerces-csrc_1_1_0_d05/lib/libxerces-c1_1.so
There may be a way to fix this error, but as Sun doesn't recommend this method, it may not be worth the effort. -Eric Yankowitz [EMAIL PROTECTED] Eric Yankowitz wrote: > > The Sun Documentation recommends using the external method: > * External instances are suitable for all development and > provide the best overall template compilation. > * Static instances are suitable for very small programs > or debugging and have restricted uses. > ..stuff deleted... > You should use the external instances method, which is the default, > unless there > is a very good reason to do otherwise. > > This is from: > http://docs.sun.com:80/ab2/coll.32.5/CPPPUG/@Ab2PageView/14127?Ab2Lang=C&Ab2Enc=iso-8859-1 > > The linker also complained about duplicate symbols. Off the top, I > don't remember if it was a warning or an error. I'll check tomorrow, > because I don't have access right now. > > Since the shared library was linked with -mt, libc reported > a mutex error at runtime and crashed when the sample programs > were compiled and linked without -mt. > > >From the Sun Documentation: > If you compile and link in separate steps and you compile > with -mt, be sure to link with -mt, as shown in the following example, > or you might get unexpected results. > > demo% CC -c -mt myprog.cc > demo% CC -mt myprog.o > > This is from: > http://docs.sun.com:80/ab2/coll.32.5/CPPPUG/@Ab2PageView/7898?Ab2Lang=C&Ab2Enc=iso-8859-1 > > Hope this helps, > > -Eric Yankowitz > [EMAIL PROTECTED] > > Arundhati Bhowmick wrote: > > > > Eric, > > Thanks a lot for your effort on Sun CC 5.0. However before I introduce the > > changes I'd like to make sure the changes work with old version of sun CC as > > well. Besides I need to clarify few questions regarding your changes - > > 1. Why do you need external template instance? What fails if its not? The > > 'instance=static' option was introduced to avoid creating of external > > templates for one of our customer so I need to understand exactly what your > > requirments are on this. > > 2. Why do you need -mt switch in samples when they are not using any > > threading operations? > > > > Arundhati