Super easy question!!!

Just wondering do visual C++ programs have to carry around those huge runtime files like VB????

NoelH
LVL 1
stephenbladeAsked:
Who is Participating?
 
chensuConnect With a Mentor Commented:
Non-MFC: No.

MFC: 1. Static linking - No.
     2. Dynamic linking - MFCxx.DLL (around 950KB) and MSVCRT.DLL (around 250KB).

For more information, see

Redistributing Microsoft Visual C++ 6.0 Applications
http://msdn.microsoft.com/isapi/msdnlib.idc?theURL=/library/techart/redistribvc6.htm
0
 
noelhCommented:
So for an extra 30 points what in very basic laymens terms is the difference between static and dynamic linking?


StephenB

0
 
jasonclarkeCommented:
linking statically means that the object code required from libraries (such as the windows libraries) gets copied into the excutable file when the application is linked - so the library code increases the size of the executable file.

linking dynamically means that the object code required for libraries stays in library files (DLLs are dynamic link libraries) and is loaded by the operating system as required at run time.

There are advantages and disadvantages to both approaches.
0
 
nietodCommented:
I'm not sure that I agree with chensu.  It may depend on what exactly you call large, but when VC program is dynamically linked to the runtime library (RTL), it requires the MSVCP60.DLL  (401,462 bytes) and the MSVCRT.DLL  (254,005 bytes) or more than 600K of DLL space.  Now if you statically link to the RTL, it will not take up as much space, because there are likely to be portions of the RTL that you are not using and that cn be stripped from the final executable.
0
 
chensuCommented:
>It may depend on what exactly you call large

Yes, stephenblade is comparing with VB run-time library. VB code should be larger than equivalent C++ code.
0
All Courses

From novice to tech pro — start learning today.