Boost logo

Boost Users :

Subject: Re: [Boost-users] [Regex] Can't create dylib that links regex statically
From: Arash Abghari (arash.abghari_at_[hidden])
Date: 2010-12-16 17:41:51


I believe you can not build regex with runtime-link=static. make it
runtime-link=shared. It worked for me on both Linux and Windows
Platforms.

Arash

On Thu, 16 Dec 2010 14:21:34 -0800
Marcos Pearson <marcos.pearson_at_[hidden]> wrote:

> Hi there,
>
> I'm hoping someone can give me some hints on what I'm doing wrong.
> I'm trying to create a library that uses regex and has no external
> dependencies. My understanding is that I need to compile boost to be
> static and link static at runtime. My project is multi-platform, but
> I'm currently working on OSX 10.6.5.
>
> To build boost, I'm using the following command:
>
> sudo ./bjam link=static threading=multi runtime-link=static
> architecture=combined address-model=32_64 macosx-version=10.5
> macosx-version-min=10.5 install
>
> In Xcode, I've included the produced library, libboost_regex.a, in my
> Xcode project. I compile my dylib without errors or warning.
> However, I'm unable to load it. Checking the dependencies, my
> library seems to want the libboost_regex.dylib. Why?
>
> $ otool -L libglobalkvp.dylib
> libglobalkvp.dylib:
> /usr/local/lib/libglobalkvp.dylib (compatibility version 1.0.0,
> current version
> 1.0.0) /Users/marcospearson/Library/Frameworks/iqvectorsdk.framework/Versions/A/iqvectorsdk
> (compatibility version 1.0.0, current version 1.0.0)
> libboost_regex.dylib (compatibility version 0.0.0, current version
> 0.0.0) /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0,
> current version 7.4.0) /usr/lib/libgcc_s.1.dylib (compatibility
> version 1.0.0, current version 1.0.0) /usr/lib/libSystem.B.dylib
> (compatibility version 1.0.0, current version 111.1.4)
>
> I've built, and re-build the boost libraries more times that I can
> remember and have read post after post, but haven't been able to
> figure out a solution. Any help would be appreciated.
>
> Thanks,
>
> Marcos


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