|
Boost Users : |
From: Kesseli Pascal (pascal_kesseli_at_[hidden])
Date: 2008-06-03 22:12:55
Hello everyone
Today, I just happened to download the latest version of cygwin, including
gcc 3.4.4. While a simple hello world works perfectly fine, trying to
compile this code using a statically linked libserialization.a results in
dozens of linker errors, all stating "undefined reference to `__assert'".
#include <boost/assign/list_of.hpp>
#include <boost/archive/xml_iarchive.hpp>
#include <boost/archive/xml_oarchive.hpp>
#include <boost/lambda/lambda.hpp>
#include <boost/serialization/vector.hpp>
#include <iostream>
#include <fstream>
using namespace boost::lambda;
using namespace boost::assign;
using namespace boost::archive;
using namespace boost::serialization;
using namespace std;
int main() {
{
vector<string> v = list_of("123")("Boost")("Serialization");
ofstream ofs("test.xml");
xml_oarchive oxml(ofs);
oxml << make_nvp("VectorTest", v);
}
{
vector<string> v;
ifstream ifs("test.xml");
xml_iarchive ixml(ifs);
ixml >> make_nvp("VectorTest", v);
for_each(v.begin(), v.end(), cout << _1 << "\n");
}
return 0;
}
Is this a problem or known issue when using cygwin? I'm using eclipse in
addition, by the way. The code works perfectly fine on other platforms, so I
imagine it must be a problem when using the serialization library with
cygwin.
Thanks in advance for any help you can offer me here and best regards
Pascal Kesseli
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