|
From: | Lorenzo Bettini |
Subject: | Re: building a completely static executable (using boost regex library) |
Date: | Wed, 15 Jul 2009 21:50:01 +0200 |
User-agent: | Thunderbird 2.0.0.22 (X11/20090608) |
Bob Friesenhahn wrote:
On Tue, 14 Jul 2009, Lorenzo Bettini wrote:I was trying to build, in linux, a completely static executable that uses libboost_regex;I issued configure LDFLAGS="-static" make LDFLAGS="-all-static" but when it comes to linking I get this error:/bin/bash ../libtool --tag=CXX --mode=link g++ -g -O2 -L/usr/lib -all-static -o check-regexp check-regexp_cmd.o check-regexp.o -lboost_regex ../gl/libgnu.la libtool: link: g++ -g -O2 -static -o check-regexp check-regexp_cmd.o check-regexp.o -L/usr/lib -lboost_regex ../gl/.libs/libgnu.a /usr/lib/libboost_regex.a(static_mutex.o): In function `boost::scoped_static_mutex_lock::unlock()':what am I doing wrong?Your project is lacking a dependency on the thread library. When static linking, all the libraries that your library depends on need to be listed.
it looks like stdlib depends on that, but I thought there was a static version of that too... also libboost_regex seems to depend on that...
how can one know all the libraries to link to? I'm using autotools, and I thought that it would take care of that...
-- Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino ICQ# lbetto, 16080134 (GNU/Linux User # 158233) HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com http://www.myspace.com/supertrouperabba BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com http://www.gnu.org/software/src-highlite http://www.gnu.org/software/gengetopt http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net
[Prev in Thread] | Current Thread | [Next in Thread] |