MSVC8 bloated exe dependencies?

Started by
4 comments, last by Nairb 18 years, 4 months ago
I'm almost finished with my first graphical game (pong with sdl). I'm not trying to find out why the exe requires a certain dll to run on windows machines. Unfortunately I don't have the actual name of the dll written down, but it's something along the lines of MSVC80.dll. Most of my computers apparently already have this dll - 2 xp pro machines (including 1 with visual c express on it - the main development machine). Compiled under linux with g++ the game also runs fine on my two linux boxes. However I have an older win2k box that requires this dll, and I'm not quite sure why. The only libraries I'm using in the project are sdl, sdl_image, std::string, std::vector, and cmath (which I'm thinking might be the culprit?). In any case, can someone tell me how to hunt down the purpose of the file and why my program needs it when running/compiled on windows? Thanks
Advertisement
for distributing apps compiled with vc++ express you need to see this link. (thanks to phantom for finding it for me recently. [smile])
This space for rent.
The file your thinking of is MSVCR80.DLL. MicroSoft Visual C Runtime. *Every* c++ program compiled has a dependency on a core set of libraries which provide functions such as math, i/o, and program initialisation (the stuff that happens before main() is called). Most computers have the runtime DLLs for MSVC7 and earlier which is why you rarely hear about problems with this version of the compiler, and every Linux distribution comes with libc (the Linux equivalent of MSVCR).

There 2 different ways in which you can link to these core libraries, statically and dynamically. When linking dynamically your program's executable will depend on dynamic libraries, ie DLL's (or .so's in linux), this is more efficient space-wise since all the c/c++ programs can all use a single copy of the library. When linking statically, instead of having these runtime dependencies a copy of the runtime library is 'copied' into the executable itself. So while you no longer have these dependencies, your executables will be larger.

If you want to find the required DLL's files, do a search in C:\WINDOWS\SYSTEM32 (or perhaps C:\WINDOWS\WinSxS, the files you'll find here have extra version information, I'm not sure on the correct distribution method for these). It's probably easier for you to link statically though.
"Voilà! In view, a humble vaudevillian veteran, cast vicariously as both victim and villain by the vicissitudes of Fate. This visage, no mere veneer of vanity, is a vestige of the vox populi, now vacant, vanished. However, this valorous visitation of a bygone vexation stands vivified, and has vowed to vanquish these venal and virulent vermin vanguarding vice and vouchsafing the violently vicious and voracious violation of volition. The only verdict is vengeance; a vendetta held as a votive, not in vain, for the value and veracity of such shall one day vindicate the vigilant and the virtuous. Verily, this vichyssoise of verbiage veers most verbose, so let me simply add that it's my very good honor to meet you and you may call me V.".....V
Thanks for the info.

Is the crt a mandatory windows update option - or am I going to have to manually do this for everything I want to distribute for the next 6+ years (until windows 2k and xp are in lower usage than 98 today)?
I'd expect it to be appearing in Windows Updates soon-ish, if it hasn't already.
"Voilà! In view, a humble vaudevillian veteran, cast vicariously as both victim and villain by the vicissitudes of Fate. This visage, no mere veneer of vanity, is a vestige of the vox populi, now vacant, vanished. However, this valorous visitation of a bygone vexation stands vivified, and has vowed to vanquish these venal and virulent vermin vanguarding vice and vouchsafing the violently vicious and voracious violation of volition. The only verdict is vengeance; a vendetta held as a votive, not in vain, for the value and veracity of such shall one day vindicate the vigilant and the virtuous. Verily, this vichyssoise of verbiage veers most verbose, so let me simply add that it's my very good honor to meet you and you may call me V.".....V
Also, be sure to compile in Release mode. I've had problems moving Debug mode compilations across machines which do not have Visual Studio installed.

Cheers,
--Brian

This topic is closed to new replies.

Advertisement