|
Boost : |
Subject: Re: [boost] [utf8_codecvt_facet]
From: Marshall Clow (mclow.lists_at_[hidden])
Date: 2013-01-06 12:59:38
On Jan 5, 2013, at 10:53 PM, Robert Ramey <ramey_at_[hidden]> wrote:
>> I tried to extract this into a simple test case (attached), but I
>> can't figure out what to link against for the wide case.
>>
>> clang++ junk.cpp -DNARROW -I /Sources/boost/trunk -L
>> $BUILD/libs/serialization/$TAIL -lboost_serialization # works
>> clang++ junk.cpp -I /Sources/boost/trunk -L
>> $BUILD/libs/serialization/$TAIL -lboost_wserialization # does not
>>
>> For the narrow case, I link against lib boost_serialization, and
>> everything is good.
>> For the wide case, when I link against boost_wserialization, I get
>> the following errors:
>>
>>> Undefined symbols for architecture x86_64:
>> Can you tell me how to solve this?
>
> for the wide case, one would have to link with BOTH boost_serialization
> as well as boost_wserialization.
Here's my dirt-simple test case:
#include <fstream>
#include <boost/config.hpp>
#include <boost/archive/binary_wiarchive.hpp>
int main(int argc, char *argv [] ) {
std::wifstream is(argv[1], std::wios::binary);
try {
boost::archive::binary_wiarchive ia(is, 0);
}
catch (boost::archive::archive_exception ae){}
return 0;
}
When I build it thus:
g++ ser-test2.cpp -I /Sources/boost/trunk -lboost_wserialization -lboost_serialization
I get:
Undefined symbols for architecture x86_64:
"boost::archive::basic_binary_iarchive<boost::archive::binary_wiarchive>::load_override(boost::archive::class_name_type&, int)", referenced from:
void boost::archive::binary_iarchive_impl<boost::archive::binary_wiarchive, wchar_t, std::char_traits<wchar_t> >::load_override<boost::archive::class_name_type>(boost::archive::class_name_type&, int)in ccfHj5hR.o
"boost::archive::basic_binary_iarchive<boost::archive::binary_wiarchive>::init()", referenced from:
boost::archive::binary_iarchive_impl<boost::archive::binary_wiarchive, wchar_t, std::char_traits<wchar_t> >::init(unsigned int)in ccfHj5hR.o
"boost::archive::basic_binary_iprimitive<boost::archive::binary_wiarchive, wchar_t, std::char_traits<wchar_t> >::init()", referenced from:
boost::archive::binary_iarchive_impl<boost::archive::binary_wiarchive, wchar_t, std::char_traits<wchar_t> >::init(unsigned int)in ccfHj5hR.o
"boost::archive::basic_binary_iprimitive<boost::archive::binary_wiarchive, wchar_t, std::char_traits<wchar_t> >::basic_binary_iprimitive(std::basic_streambuf<wchar_t, std::char_traits<wchar_t> >&, bool)", referenced from:
boost::archive::binary_iarchive_impl<boost::archive::binary_wiarchive, wchar_t, std::char_traits<wchar_t> >::binary_iarchive_impl(std::basic_istream<wchar_t, std::char_traits<wchar_t> >&, unsigned int)in ccfHj5hR.o
"boost::archive::basic_binary_iprimitive<boost::archive::binary_wiarchive, wchar_t, std::char_traits<wchar_t> >::~basic_binary_iprimitive()", referenced from:
boost::archive::binary_iarchive_impl<boost::archive::binary_wiarchive, wchar_t, std::char_traits<wchar_t> >::~binary_iarchive_impl()in ccfHj5hR.o
boost::archive::binary_iarchive_impl<boost::archive::binary_wiarchive, wchar_t, std::char_traits<wchar_t> >::~binary_iarchive_impl()in ccfHj5hR.o
boost::archive::binary_iarchive_impl<boost::archive::binary_wiarchive, wchar_t, std::char_traits<wchar_t> >::~binary_iarchive_impl()in ccfHj5hR.o
boost::archive::binary_iarchive_impl<boost::archive::binary_wiarchive, wchar_t, std::char_traits<wchar_t> >::binary_iarchive_impl(std::basic_istream<wchar_t, std::char_traits<wchar_t> >&, unsigned int)in ccfHj5hR.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
What am I missing?
-- Marshall
Marshall Clow Idio Software <mailto:mclow.lists_at_[hidden]>
A.D. 1517: Martin Luther nails his 95 Theses to the church door and is promptly moderated down to (-1, Flamebait).
-- Yu Suzuki
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk