VS2005 C++... about the runtime library
#1
Posted 17 January 2007 - 04:04 PM
I still have a curiosity...
If I stick to C++ (using VS2005), can I force the compiler to build for the msvcrt60.dll instead of msvcrt80.dll?
Regards,
Ciao ciao : )
(readin' this? you ought to get out more)
#2
Posted 17 January 2007 - 04:20 PM
#3
Posted 17 January 2007 - 06:44 PM
Either it can't work, or I couldn't do it right :blush:
Yet another big headache was on its way... v_v#
But then I used your suggestion to reformulate my query in google.
So I came across a webpage suggesting a neat thing: use the /MT option, instead of /MD, which will statically link to the runtime.
In this way the compiled exe won't look for the DLL to link to at run-time, but it'll use its own copy of it, incorporated at compile time.
The cons of this method are 2:
1) the final compiled exe is bigger than normal;
2) in case of a multi-project solution, all of the projects have to be compiled with /MT.
The pro is: the program is sure to run on any Win OS, no matter what runtime is available.
Thanks for your time,
Ciao ciao : )
(readin' this? you ought to get out more)
#4
Posted 17 January 2007 - 07:46 PM
But I still don't understand why you need to link with the 6.0 version? msvcrt60.dll has to be distributed with your applications as well (you can't really count on the fact that the dll is already there), so you'll have exactly the same problems as with the 8.0 version.
-
Currently working on: the 3D engine for Tomb Raider.
#5
Posted 18 January 2007 - 12:05 AM
.oisyn said:
But I was curious to know of a way to NOT force the target system to have a copy of the runtime installed.
Kind of to keep things clean, since I like to *infest* the target system the least possible.
At first I thought the ideal would be to specifically build for the older runtime (version 6.0, being the most widely spread), but then a better solution was found.
Ciao ciao : )
(readin' this? you ought to get out more)
#6
Posted 18 January 2007 - 09:05 PM
#7
Posted 19 January 2007 - 02:23 AM
what if I want a one-file program: just the executable?
Also, the runtime version 8.0 is not at all that common on a Win98, or a Win2K, or even a WinXP.
Personally, I love the small utilities that you just copy somewhere, double-click and they simply run.
No installs, no reboots, no additional components required.
Ciao ciao : )
(readin' this? you ought to get out more)
#8
Posted 19 January 2007 - 03:23 AM
pater said:
#9
Posted 19 January 2007 - 09:54 AM
Jare said:
That'll give me some headaches when porting our application to VS2005 (we didn't do so yet). Thanks for the hint. :surrender
#10
Posted 19 January 2007 - 10:47 AM
-
Currently working on: the 3D engine for Tomb Raider.
#11
Posted 19 January 2007 - 02:08 PM
For the sake of testing, no more than 20 minutes ago I have compiled a program (with VS2005) in two versions (/MD and /MT) and copied both executables on a Win98SE freshly installed.
/MD version complained that the DLL wasn't found, as expected.
/MT version, instead, did run flawlessly.
Ciao ciao : )
(readin' this? you ought to get out more)
#12
Posted 19 January 2007 - 04:09 PM
-
Currently working on: the 3D engine for Tomb Raider.
#13
Posted 19 January 2007 - 06:04 PM
/MDd (debug config, dynamic link, no optimizations) : 184 KB /MTd (debug config, static link, no optimizations) : 576 KB /MD (release config, dynamic link, speed optimization) : 92 KB /MT (release config, static link, speed optimization) : 136 KB
In all 4 cases, the program carries 22.1 KB of image resources,
that is: 2 icons and 1 [80 x 80 x 8bpp] bitmap.
EDIT: Plus a VERSION_INFO block and 8 Dialogs.
No MFC used, only Win32 API.
Ciao ciao : )
(readin' this? you ought to get out more)
#14
Posted 19 January 2007 - 08:54 PM
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












