Boost questsion: Link error with boost using g++ and serialize
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
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
kauai wrote:
| 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
participants (2)
-
Daniel Goller
-
kauai