15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


MSVCRT40.DLL

Tim Peacock -- tim.peacock@isltd.insignia.com
Tuesday, November 19, 1996

     
     Environment:  VC++ 4.1, NT 3.51
     
     i have a DLL which does not use MSVCRT40.DLL.  However, the imports 
     section of the DLL shows that _initterm is imported.  This appears to 
     be what calls the DLL entry point.  We don't want this (apparently) 
     pointless dependency.  Can i safely remove MSVCRT40.DLL from my build 
     and explicitly give my library's entry point to the linker?
     
     We really don't understand why MSVCRT40 is included in every image 
     built by MSVC regardless of whether or not it is used.  We want to be 
     rid of it because we are building low-level system components and a 
     faulty upgrade of (say) MSVC might leave us with a system onto which 
     nobody can log.
     
     TIA,
     
                                                                tim.



Mike Blaszczak -- mikeblas@nwlink.com
Thursday, November 21, 1996

At 18:22 11/19/96 +0000, Tim Peacock wrote:
     
>     Environment:  VC++ 4.1, NT 3.51
  
>     i have a DLL which does not use MSVCRT40.DLL.  However, the imports 
>     section of the DLL shows that _initterm is imported. 

Then there must be some code that references it, someplace, even if 
you've not explicitly called that code.

> This appears to 
>     be what calls the DLL entry point.  We don't want this (apparently) 
>     pointless dependency.

The dependency has a reason to be there; you've told the linker or
compiler to rely on that code, somehow--maybe implicitly.
Maybe you've specified bad options to the compiler or linker.
     
>     We really don't understand why MSVCRT40 is included in every image 
>     built by MSVC regardless of whether or not it is used. 

It isn't: this simply isn't true.  It's only referenced if you use /MD or
/MDd when you compile modules in the program.  If your goal is really
to avoid the runtime libraries, you shouldn't specify _any_ /M?? option,
and you should use /Zl.

> TIA.

BMAHT.  TIA.

(By the way, what's this got to do with MFC?)


.B ekiM
http://www.nwlink.com/~mikeblas/
I'm afraid I've become some sort of speed freak.
These words are my own. I do not speak on behalf of Microsoft.





| Вернуться в корень Архива |