Boost logo

Boost Users :

Subject: Re: [Boost-users] How can I make the libboost_regex.a static library?
From: John Maddock (boost.regex_at_[hidden])
Date: 2012-10-26 04:29:03


> Transitioning an application from CentOS 5 to CentOS 6 and I noticed
> that neither the boost-devel nor boost-static rpms contain the
> libboost_regex.a static library. The boost-static rpm has most of the
> static libs but not that one. The CentOS 5 boost-devel package had
> the static library. I know dynamic libraries are encouraged but I
> still need the static lib.
>
> I grabbed the boost src rpm. I guess I need to build a custom version
> of the static rpm, but not sure yet which Makefile or where to make a
> change to get the libboost_regex.a.

The official answer is to follow:
http://www.boost.org/doc/libs/1_51_0/more/getting_started/unix-variants.html#prepare-to-use-a-boost-library-binary

But since regex is "just a bunch of source files", you could just compile
all of libs/regex/src/*.cpp and then put the resulting .o files in an
archive.

HTH, John.


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