Boost logo

Boost Users :

From: kauai (kauai_diver_at_[hidden])
Date: 2005-04-19 16:55:06


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>(boost::archive::text_oarchive&, Attribute&,
unsigned)':

/usr/include/c++/3.2.2/bits/stl_alloc.h:238: undefined
reference to `void
Attribute::serialize<boost::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>(boost::archive::text_iarchive&, Attribute&,
unsigned)':
/usr/include/c++/3.2.2/bits/stl_alloc.h:238: undefined
reference to `void
Attribute::serialize<boost::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


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