ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> boost
boost
RE: [boost] shared-linkable-true, runtime-link-dynamic andruntime-link-static
by Petr Kocmid other posts by this author
Oct 16 2002 11:59PM messages near this date
Re: [boost] shared-linkable-true, runtime-link-dynamic and runtime-link-static | Re: [boost] shared-linkable-true, runtime-link-dynamic and runtime-link-static
>  On Behalf Of David Abrahams
>  I don't think we're answering his question here. Are the components of
>  statically-linked libraries which link to a static runtime built any
>  differently from those which link to a dynamic runtime? Are they
>  linked (Windows) or archived (Unix) any differently? I think the
>  answer on Unix is no in both cases. I'm not sure about Windows.

On native windows, answer is yes. Consider, that for VC6 there is at least
six different switches for code generation to call runtime libraries:
/ML single threaded, static runtime
/MT multithreaded,  static runtime
/MD multithreaded, dynamic runtime, usualy used for DLL builds
/MLd /MTd /MDd the same for debug build

Generally, you must compile a unit with appropriate switch to link properly
with desired library later on. For a user of a single library, you have to
build a six different .lib files + two dlls for one optimized processor
architecture. You MUST have this switch consistent across all units in one
library+application target. And, calling convention is yet another story...

Alkis, you should understand, that on win32 there is, in case of C++ binding
AND VC compatible compilers, a static library for static linkage and a
dynamic library AND static import library of this dynamic library for
dynamic linkage. There is no dynamic linker on win32 as it is in Linux, only
dynamic loader, so bindings to dynamic names are 'statically' resolved
through import library glue code. The big difference is that unix shared
libraries are much easier to use and lower on memory consumption, but slower
to initialize than win32 ones.

With cygwin or Borland tools, dll things are little more complicated...

Petr Kocmid

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Thread:
Alkis Evlogimenos
Rene Rivera
David Abrahams
Petr Kocmid
Alkis Evlogimenos
David Abrahams
Alkis Evlogimenos
David Abrahams
Neal D. Becker
Rene Rivera
Jeff Garland

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved