Viv
2010-02-18 11:52:47 UTC
Hi all,
I wrote an application using Visual C++ 2008 that has to be as small
as possible. By using the /MD flag (Multi-threaded) I link dinamycally
with the MSVCR90.DLL which is not by default an all OSs. I would like
to link dinamically with the MSVCRT.DLL because then I won't need to
deploy the DLL as it's by default on every OS starting at least with
Win 2000.
1) I wrote a simple "hello world" application and I did the following
settings:
- Linker -> Input -> Ignore all default Libraries: Yes (/NODEFAULTLIB)
- then b/c I was getting linking errors I also did: Linker -> Command
Line -> Additional Options: msvcrt.lib
Now the app builds, but looking at the final exe with depends.exe I
see that it still depends on the: msvcr90.dll.
Can smbd tell me if this is a "normal" behaviour? I mean to still be
dependant on msvcr90.dll? And how could one actually get rid of the
msvcr90.dll?
2) I also read the article:
http://kobyk.wordpress.com/2007/07/20/dynamically-linking-with-msvcrtdll-using-visual-c-2005/
but this didn't work for me. Maybe I missed some steps? Can smbd that
actually succeded in doing that write the steps he/she did?
3) Related with the article mentioned above: How can the developers
that use WDK to build their products (eg drivers developers), to
actually run their products in debug mode if there is no where to be
found a msvcrtd.dll?
Thanks in advance,
Viv
I wrote an application using Visual C++ 2008 that has to be as small
as possible. By using the /MD flag (Multi-threaded) I link dinamycally
with the MSVCR90.DLL which is not by default an all OSs. I would like
to link dinamically with the MSVCRT.DLL because then I won't need to
deploy the DLL as it's by default on every OS starting at least with
Win 2000.
1) I wrote a simple "hello world" application and I did the following
settings:
- Linker -> Input -> Ignore all default Libraries: Yes (/NODEFAULTLIB)
- then b/c I was getting linking errors I also did: Linker -> Command
Line -> Additional Options: msvcrt.lib
Now the app builds, but looking at the final exe with depends.exe I
see that it still depends on the: msvcr90.dll.
Can smbd tell me if this is a "normal" behaviour? I mean to still be
dependant on msvcr90.dll? And how could one actually get rid of the
msvcr90.dll?
2) I also read the article:
http://kobyk.wordpress.com/2007/07/20/dynamically-linking-with-msvcrtdll-using-visual-c-2005/
but this didn't work for me. Maybe I missed some steps? Can smbd that
actually succeded in doing that write the steps he/she did?
3) Related with the article mentioned above: How can the developers
that use WDK to build their products (eg drivers developers), to
actually run their products in debug mode if there is no where to be
found a msvcrtd.dll?
Thanks in advance,
Viv