Boost logo

Boost Users :

Subject: Re: [Boost-users] [Program Options] Linking both statically and dynamically
From: Anthony Foglia (AFoglia_at_[hidden])
Date: 2010-05-12 13:28:17


OvermindDL1 wrote:
> As far as I know (which should be 'enough'), for libraries like that,
> any mixing of static and dynamic linking *will* break. The only way
> to work around it is for the main application to be static, but have
> the other libraries dynamically link to the static version in the main
> application, and *not* to the system library, that can be done, but it
> requires a bit of working around.

(The following is no longer about boost, so feel free respond privately
or send me somewhere else.)

I don't quite follow. First, what do you mean by "libraries like that?"
  Does that mean it would work for (some) other libraries? How do I
know what type?

Also, the main application is linked statically to some libraries (our
libraries) and dynamically to others. Ignoring other libraries, we have

executable both
   statically linked to our utilities which is statically linked to
program options
   dynamically linked to program options.

What I set up yesterday was to change this t

executable
   statically linked to our utilites which is statically linked to
program options
   statically linked to program options

What you're describing, if I read it correctly is

executable
   statically linked to our utilites which is dynamically linked to the
copy of program options in the executable
   statically linked to program options

That doesn't make much sense to me. (I doubt it's what we want anyway.)

I think another solution, if it's possible would be

executable
   statically linked to our utilities which is dynamically linked to
program options
   dynamically linked to program options

but I'm not sure you can have a static library that links dynamically to
another library.

I'd like to figure out what the possibilities are before I take this to
the boost-build list to ask how best to configure it.

-- 
Anthony Foglia
Princeton Consultants
(609) 987-8787 x233

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