Hi!

As one could expected I was doing something wrong even though not that obvious
this time ;-)

I realized that the good old "RTFM" might be something for me. After some
serious digging I finally realized this:

The Xerces/Xalan shared library depends on some stuff in STL but these symbols
are not included in the libraries (and should not be). I then built a wrapper
class around these two and made that a shared library too. When building a
shared library (i.e. using the flag -G with CC) none of the standard libraries
(e.g. libC, libCstd ...) are included (linked to). When I finally built the
program linking it only to my own library none of the symbols needed by the
Xalan/Xerces libraries where "included" by the compiler/linker (since there is
no dependency to them). This means that the STL-symbols were not "included" at
all (or perhaps more accurately no "handle" to them were offered) even though
the program depend on them implicitly. The solution to this is to explicitly
link to libCstd when building my own library of wrappers.

//daniel



Erik Rydgren  (2003-07-17  10:37):
>Yes that is correct. But why the compiler doesn't instantiate the
>template already in the library is beyond me.
>But your solution to the problem is valid.
>
>/ Erik
>
>> -----Original Message-----
>> From: Ingolf Steinbach [mailto:[EMAIL PROTECTED]
>> Sent: den 16 juli 2003 18:13
>> To: [EMAIL PROTECTED]; Erik Rydgren
>> Subject: Re: linkproblems
>>
>> On Wednesday 16 July 2003 13:37, Erik Rydgren wrote:
>> > Just feed the linker the required libraries and these errors should
>go
>> > away.
>>
>> I fear that the problem might be more complicated than it
>> seems: What the linker complains about are missing template
>> instantiations. Depending in the compiler/linker, it might be
>> impossible to automatically instantiate (and compile) the
>> missing templates at link time.
>>
>> The OP might be lucky and his compiler comes with a libC.so
>> which already contains instantiations of standard templates
>> for "usual" types (whatever "usual" might mean in this case,
>> for instance std::istream<char, std::char_traits<char> >) or
>> the compiler performs some magic to automatically compile
>> the missing instantiations *with the same compiler flags* as
>> the libxalan.
>>
>> But probably his only chance is to create a source file with
>> all missing template instantiations and link the resulting
>> object with the rest of his work.
>>
>> Kind regards
>>     Ingolf
>> --
>>
>> Ingolf Steinbach                       Jena-Optronik GmbH
>> [EMAIL PROTECTED]       ++49 3641 200-147
>> PGP: 0x7B3B5661  213C 828E 0C92 16B5  05D0 4D5B A324 EC04
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>

------------------------------------------------------------------
RFV Data                          E-post: [EMAIL PROTECTED]
Utvecklingsenheten/Grupp 2        Tfn: 060-187126
S.a J�rnv�gsgatan 41              Mobil: 070-3016517
851 93 Sundsvall                  Fax: 060-147870
------------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to