Re: Different C runtime libraries
- From: "Eugene Gershnik" <gershnik@xxxxxxxxxxx>
- Date: Mon, 11 Jul 2005 13:02:26 -0700
SerGioGio wrote:
>
>
> I really see no reason at all. For example the debug and release CRT
> version should have exactly the same interface. Only be the
> implementation should differ, not the interface .h files! If my .LIB
> references "printf", the printf function to use should be the version
> of the CRT at link time. .LIB should be only seen as a bunch of .OBJ
> files put together. Why can't the world be so easy?
And if my lib creates a FILE * then passes it to your lib and your lib
passes it to fprintf which fprintf should be called? If it is yours it
cannot handle a FILE that has different members from what it expects. And my
mutlithreaded debug FILE will be very different from your singlethreaded
release one. If it should call my fprintf then your code needs to magically
call different fprintf-s depending on who gave it the FILE *. (This can
actually be done with pure C++ interfaces but not with C APIs).
> As far as I can see:
> - when distributing a LIB you need to make up to 8 versions:
> ST / MT, debug / release
> - what about gcc users of your LIB, who will not be using
> MSVCRTxxx.lib?
And MTDLL one and also multiply this by 2 for MBCS/Unicode builds.
> Considering this, are .LIB any useful? If yes: to which purpose?
Are screwdrivers any useful? Last time I visited a tool store there were
hundreds of different varieties there.
> Are
> DLLs the only way of safely working with libraries?
This question is meaningless as you didn't define what is a library and what
is safely.
--
Eugene
http://www.gershnik.com
.
- Follow-Ups:
- Re: Different C runtime libraries
- From: Igor Tandetnik
- Re: Different C runtime libraries
- References:
- Different C runtime libraries
- From: SerGioGio
- Different C runtime libraries
- Prev by Date: Re: Different C runtime libraries
- Next by Date: Re: Different C runtime libraries
- Previous by thread: Re: Different C runtime libraries
- Next by thread: Re: Different C runtime libraries
- Index(es):
Relevant Pages
|