Boost logo

Boost Users :

Subject: [Boost-users] solved - Can't dynamically load shared lib that is statically linked to boost thread
From: Greg Carter (greg9504_at_[hidden])
Date: 2012-02-02 00:05:01

Well it turns out despite not receiving any link errors I wasn't linking to
libboost_thread.a as I thought I was. On Windows this seems to be handled
by the auto link facility and I figured the same on linux. Which explains
why when I explicitly link to the shared everything
worked. However explicitly linking to the static libboost_thread.a
resulted in a link error of relocation R_X86_64_32 ... recompile with

Doing a custom compile with the fPIC option set fixed that.

./bjam -a --prefix=/usr/local/boost_1_47_0 cxxflags=-fPIC --with-thread

This only seems to have updated the stage directory though and not
boost_root/lib. Not sure why that is as I didn't pass the --stage option.

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at