Boost logo

Boost-Build :

From: Rene Rivera (grafik.list_at_[hidden])
Date: 2005-03-04 01:39:52


leomaheo wrote:
>
>>>boost_date_time-vc71-mt-p-1_31.dll
>>>depends on
>>>STLPORT_VC746.DLL
>>>c:\windows\system32\MSVCP71.DLL
>>>c:\windows\system32\MSVCR71.DLL
>>>c:\windows\system32\KERNEL32.DLL
>>
>>What does "depends" show for STLPORT_VC746.DLL?
>
>
> It depends on
>
> MSVCP71.DLL
> MSVCR71.DLL
> KERNEL32.DLL
>
> But please note that boost_date_time-vc71-mt-p-1_31.dll depends
> directly on MSVCP71.DLL and MSVCR71.DLL, not through STLPORT_VC746.DLL

Yes.. But your original request was:

> I'm using the Boost shared_ptr and weak_ptr classes, and the Boost
> Date-Time package. I'm using STLport, and do not want to distribute
> any MSVCR71.dll with my application. I do not know much about linking
> and how the linker selects which .lib-file to use, and I wonder
> whether it is possible to use Boosts without MSVCR71.dll. Is it
> possible?

For which you have shown the answer to be *no*. Because using STLPort
will not remove the dependency on MSVCR71.dll. So it doesn't matter that
Boost.DateTime also depends on it.

No for the other questions... Which I'm answering.. but really you
should consider reading general docs about linking.. The closest being
the docs that come with your development environment.

> The Boost "Getting Started" information says the "s" in a library name
> means "Static link to runtime". Can anyone please explain what this
> means?

It means that it was compiled with the option that tells the compiler to
use the statically linked library version of the runtime. As opposed to
being compiled with the option that tells the compiler to use the
dynamically loaded library version of the runtime.

> How do I know which version (i.e. with or without "s") the linker
> selects?

You tell the linker which one to use.. But from your question I'll guess
that you are really asking about the automatic linking support in MSVC
that some of the Boost libraries support. In that case you tell the
compiler that you want to use the static or dynamic runtime. Consult the
MSVC documentation on how to do that.

> Another question: what is the difference between the two libs below?
> (I guess the first one is used to dynamically attach to
> boost_date_time-vc71-mt-p-1_31.dll in some way, wheareas the second
> one itself contains all code provided by the .dll file?)

Your guess is correct. Again go read about static vs. dynamic libraries.
The docs are plentiful, and the concepts have existed for decades.

> Another question: I've checked some Boost headers, and I think it
> seems they include <vector> and then declare a vector, but they do not
> prepend _STL:: (i.e. the declaration read "vector someVector" not
> "_STL::vector someVector"). I haven't seen any "using namespace _STL"
> directive; is it really _STL vectors that are used, or are std vectors
> used? If std::vector is used, then it should be impossible to avoid
> MSVCR71.dll?

Ahh.. Read the STLPort documentation.. Or possible ask a similar
question on the STLPort list.

> Another question: When I build Boost, I only want to use the Date-Time
> package (and shared_ptr and weak_ptr). I added this switch to jam:
> "--with-Date-Time", but despite this, all libraries were built again
> :-(. Is "--with-Date-Time" incorrect? What should I write instead?

Use "--with-date_time".

> Finally, now when you know what I don't know, would you please like to
> expalin how can I get rid of the MSVCR71.dll dependency (if you have
> time and haven't already explained this, of course :-))

Truthfully, I don't know the answer. Generally you might try using the
static runtime. But go read about the pitfalls of doing that. Or use
some other runtime, there are free and commercial alternatives. Or use a
different compiler which uses a different runtime, MinGW comes to mind.

And lastly.. Some netiquette for you. You probably noticed that the
responses to your questions, mine and others, aren't exactly friendly.
The reason is simple; People in technical forums generally find it
irritating to answer newbie questions for which there are mountains of
documentation available. Next time you might want to do some
investigation about the subject before asking. After all discovery is a
fun way to learn ;-)

-- 
-- Grafik - Don't Assume Anything
-- Redshift Software, Inc. - http://redshift-software.com
-- rrivera/acm.org - grafik/redshift-software.com - 102708583/icq
 

Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk