Boost logo

Boost Users :

From: Topi Mäenpää (topi.maenpaa_at_[hidden])
Date: 2005-11-02 12:18:29


Replying to myself...

The issue is still not resolved, but I got a bit further. The slight
difference in the mangled function signatures is a rather significant
one. (Just found out what the undname.exe program in VC++ bin dir does.)
It seems that the boost serialization library contains save/load
definitions for single-byte character strings, not the wide char
versions. "G" demangled seems to be "unsigned short" while "D" stands
for "char". So, how do I make my application use the single-byte version
of std::string?

-Topi-

Topi Mäenpää wrote:
> Hi,
>
> I have struggled to get the boost libraries link into my application
> with no success so far. I was able to compile most of the demo programs
> with bjam, but it seems that only static linking is used there. I'm
> using the dynamic versions. The libraries compiled fine with MSVC.NET
> 7.1. However, whenever I try to link them to an application, every
> symbol seems to be undefined. I turned on the diagnostics to see that
> the automatic linking is happening (with the nonstandard preprocessor
> stuff). I also added the libraries to my project manually without
> success. The funny (?) thing is that the lib file has a definition for
> the "missing" functions, except for one minor difference. This is the
> mangled symbol the linker complains about:
>
> __imp_?save@?$xml_oarchive_impl_at_Vxml_oarchive_at_archive@boost@@@archive_at_boost@@QAEXABV?$basic_string_at_GU?$char_traits_at_G@std@@V?$allocator_at_G@2@@std@@@Z
>
>
> (Omitting namespaces this one decrypts to
> xml_oarchive_impl<xml_oarchive>::save(basic_string& const))
>
> This is what seems to be in the library:
>
> __imp_?save@?$xml_oarchive_impl_at_Vxml_oarchive_at_archive@boost@@@archive_at_boost@@QAEXABV?$basic_string_at_DU?$char_traits_at_D@std@@V?$allocator_at_D@2@@std@@@Z
>
>
> The only difference is that the library symbol contains a "D" and the
> linker is looking for "G" in a couple of places. I have found no way of
> going any further. Since the demos are built in debug mode and with
> static libraries, I found no useful information by inspecting the
> commands bjam uses in building them. Everything is just like I have in
> my own project.
>
> I have defined BOOST_SERIALIZATION_DYN_LINK, if you happen to think
> about that. I even managed to link my app with mingw, but got strange
> run-time errors. Everything works fine with gcc on Linux.
>
> Any advice?
>
> -Topi-
>


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net