Boost logo

Boost Users :

Subject: Re: [Boost-users] Undefined reference to boost_serialization even though it is specified with -lboost_serialization
From: Christopher Jefferson (chris_at_[hidden])
Date: 2011-02-24 06:23:29


On 24 Feb 2011, at 10:14, Cedric Laczny wrote:

> Sorry, my bad. Hit "Send" before being finished...
>
> So let's start again... I apologize.
>
>
> Hi,
>
> I have a program that uses serialization-functionality for some of the self-
> defined classes.
> I specify "-lboost_serialization" with the g++ and it works fine on my local
> machine.
> However, when I want to compile it on a remote machine, it fails. The remote
> machine is lacking >=boost-1.42 which is needed. Therefore I built (no
> install) boost-1.45 remotely (under /local/cedric/boost_1_45_0) and at least
> the configure-script (generated using autotools) seems to detect all the
> necessary libraries and headers (provided I specify them in the environment
> variables), on my local machine aswell as on the remote machine.
> Now the problem is, that I don't find the reason why it fails to compile my
> program remotely...
> Any ideas?
>
> Here's the command used for linking:
> /bin/bash ../libtool --tag=CXX --mode=link g++ -Wno-deprecated -g -O2 -
> lboost_serialization -L/local/cedric/boost_1_45_0/stage/lib -o test test-
> main.o ../includes/Parser/libparser.a -lgsl -lgslcblas -lm

This might not be your problem, but I have seen issues like this when the included headers and linked libraries are not in sync with each other. Make sure you are both picking up the right headers, and the right library files.


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