Boost logo

Boost Users :

Subject: Re: [Boost-users] Undefined reference to boost_serialization even though it is specified with -lboost_serialization
From: Viatcheslav.Sysoltsev_at_[hidden]
Date: 2011-02-24 05:32:12


> 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
>

Hi Cedric,

I did't understand exactly what you meant with 'compiling remotely'
(cross-compiling?), but if
I don't mistake, you should specify first -L, then -l in command line. If
changing order does not help, use binutils to find where the symbols are
located. Pay attention as well to linker messages like 'skipping ... due
to incompatible format' or something alike if you cross-compile.

-- Slava


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