[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: building a completely static executable (using boost regex library

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 (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/ 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)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]