[xsd-users] Problems linking Code which uses XSD in Release mode

Jan Klimke jan.klimke at hpi.uni-potsdam.de
Mon Nov 3 08:33:54 EST 2008


Hi Boris,

here are some information about my solution setup.

I put all files generated by the xsd compiler into a separate DLL-project.
Another DLL should use the library. When linking this library in release
mode the error occurs. An example project is a bit hard to create due to
the dependencies of the libraries. So you won't be able to compile the
whole project. Is it sufficient to send it  to you like this ?

Despite of that i am wondering why linking works when building in debug
mode.

Jan

Boris Kolpackov schrieb:
> Hi Jan,
>
> Jan Klimke <jan.klimke at hpi.uni-potsdam.de> writes:
>
>   
>> i got a pretty strange problem when linking my classes which are using
>> the generated code. When i link in Debug mode everything is working
>> fine, but when i switch to release mode xsd related errors occur. An
>> example for such an error can be found afterwards. It seems that some
>> string related functions can not be found. does anybody have a hint for
>> me solving this issue ?
>>     
>
> The two errors you showed involve destructors. The interesting
> thing is that the first (~ncname) is implicit (i.e., it is
> generated by the C++ compiler). I also see __declspec which 
> tells me DLLs are probably involved. Another interesting thing
> is that ncname and id class templates don't have __declspec
> specifiers so I am not sure why they appear in the symbols.
>
> Can you describe your setup in a bit more detail? Things like
> where is the generated code residing (DLL vs executable) and
> when do you get link errors (e.g., when linking the executable 
> or DLL). Also, if you could provide a test project that reproduces
> this problem then I could take a look and see if I can find
> what's going on. Feel free to send it to me directly if you
> would like to keep your code private.
>
> Boris
>   




More information about the xsd-users mailing list