|
Boost Users : |
From: Niko Vuokko (niko.vuokko_at_[hidden])
Date: 2007-07-17 14:40:55
I know there are some messages on this subject, but none of them gave me the
answer or then I just didn't understand it. I'm trying to link some boost
libraries statically to my program, but at the same time link the standard
libraries dynamically. I have little experience ( == a total noob) in the
linking process. I'm using ld version 2.16.1 and g++ version 4.1.2 on
Linux. My /usr/lib has files like
libboost_regex.so
libboost_regex-s.a
(the same for multi-threaded progs)
Actually I'm unable even to link everything statically:
ld <obj-files> -Bstatic -lboost_filesystem-s -lboost_program_options-s
-lboost_regex-s -o prog
fails. Also trying to link runtime dynamically with
ld <obj-files> -Bstatic -lboost_filesystem-s -lboost_program_options-s
-lboost_regex-s -Bdynamic -o prog
fails. I also tried to ar/ranlib the so object files into .a archives (not
sure if it can help in any case) and then link them as above, but it didn't
work either (similar linking errors). Linking everything dynamically works,
but I want to learn how to link libraries statically.
Thanks,
niko
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