Hi Folks,
Strange problem.
I have this declared inline in my class header file:
friend class boost::serialization::access;
template<class Archive> void serialize (Archive &ar,
const unsigned int version);
{
ar & m_name; // std::string
}
Builds fine, then I move this to my .cpp file and I
get a link error.
Here is the output from the linker:
test.o(.gnu.linkonce.t._ZN5boost13serialization6access9serializeINS_7archive13text_oarchiveEN19test_RT0_j+0x13):
In function `void
boost::serialization::access::serialize(boost::archive::text_oarchive&, Attribute&,
unsigned)':
/usr/include/c++/3.2.2/bits/stl_alloc.h:238: undefined
reference to `void
Attribute::serializeboost::archive::text_oarchive(boost::archive::text_oarchive&,
unsigned)'
root/abcmn/cmnUtilities/cmnGenericObjects/tests/GenericObjectsTests.o(.gnu.linkonce.t._ZN5boost13serialization6access9serializeINS_7archive13text_oarchiveEN19test_RT0_j+0x13):
In function `void
boost::serialization::access::serialize(boost::archive::text_iarchive&, Attribute&,
unsigned)':
/usr/include/c++/3.2.2/bits/stl_alloc.h:238: undefined
reference to `void
Attribute::serializeboost::archive::text_iarchive(boost::archive::text_iarchive&,
unsigned)'
collect2: ld returned 1 exit status
Any ideas?
Thanks,
Kauai
__________________________________
Do you Yahoo!?
Plan great trips with Yahoo! Travel: Now over 17,000 guides!
http://travel.yahoo.com/p-travelguide