Доброго времени суток.
Установил себе когда-то boost 1.42 через synaptic, сейчас понадобился 1.47.
Скачал с оф. сайта, собрал, скопировал папку с хедерами в usr/include. Если использовать только старые функции, то линковалось нормально, иначе вылезало undefined reference.
Выполнил
sudo cp /home/diagon/Документы/boost_1_47_0/stage/lib /usr/lib -r -f
Теперь не компилируется даже такой код
#include <boost/filesystem.hpp>
int main() { }
Выдает
g++ -lboost_system -lboost_filesystem -Wall test.cpp
/tmp/cceHblGU.o: In function `__static_initialization_and_destruction_0(int, int)':
test.cpp:(.text+0x49): undefined reference to `boost::system::generic_category()'
test.cpp:(.text+0x53): undefined reference to `boost::system::generic_category()'
test.cpp:(.text+0x5d): undefined reference to `boost::system::system_category()'
collect2: ld returned 1 exit status
Чего ему не хватает?
upd:
Сделал ./b2 install, теперь компилируется, но при запуске выдает
./test: error while loading shared libraries: libboost_system.so.1.47.0: cannot open shared object file: No such file or directory
upd:
Пересобрал так
bjam install variant=release link=static threading=multi runtime-link=static
Все заработало, всем спасибо.