Visual Studio distribution (application configuration incorrect)

Started by
6 comments, last by VariableBob 16 years, 11 months ago
I wrote an incredibly simplistic dice roller as a console application for my first C++ program. It works just as I want it to, taking the number of dice to be rolled as an input and giving the number of each result as an output (no. of 6's, 5's etc.). I sent it to some friends to see if it would be useful for playing tabletop Warhammer 40K. (It works fine for me.) It doesn't work on their computers. The error is: "The application configuration is incorrect." I have checked up on this error and found some things, but they are for serious distributions that will include full installers. I'm not doing anything that would justify that kind of thing. It is a 71 line piece of code, a 48kb executable. I have used programs (trainers for games and such) that just *run*, without any need for extra files, or installations, and that is what I want to do. How can I make it a stand-alone executable? Do I need to change the settings? Use a different compiler? I have now spent (a lot) more time looking for a solution to this problem than I did coding it, so thanks for any help you can provide.
Advertisement
Did you send your friend a release build or a debug build?
Also what operation system and compiler are you using?
It is hard to give you a better answer with out more information.
Black CloakEpee Engine.
One likely cause it that your friends do not have the C++-redistributable installed.
You can find that in C:\Program Files\Microsoft Visual C++ 2005\SDK\v2.0\BootStrapper\Packages\vcredist_x86 (or in a slightly different dir if you installed it someplace else). Have them run that exe and check then.
(And, as blackcloak noted, check you're sending a release-executable, but since it's 48k I think it is).

P.S. If the file's not there (I believe it isn't in the Express Edition of Visual Studio), they can download it at Microsoft's site.
P.S. 2. If that doesn't help, you can use Dependency Walker to check which DLL is missing on your friends machine.
Release build.
I am running XP64, they are using XP 32. Visual Studio 2005.

I would imagine that they don't have the redistributable, but that is kind of my point. I want to be able to build a standalone exe, like the trainers I mentioned. When I get to a point that I am developing large software packages, fine, I will do proper installers with DLL's and all of the added extras. But for a program this tiny and minor asking them to install DLL's is a little unreasonable. I would prefer to just have a working exe.

Dependency Walker claims that the msvcp80.dll and the msvcr80.dll are missing, the two files included in the C++ redistributable. Is it possible to include them in the exe so that they do not have to be seperately installed or is there another compiler that will just work?

I read a bit about "statically linking" dll's, would that work? If yes, what is it?
I remember having that problem once too. For now, can you just place those dlls in the same folder as your application when you give it out? But I wonder if you could statically link those libraries...
....[size="1"]Brent Gunning
I have just tried to include them, but it gives the same error message. Dependency Walker says:
"Error: The Side-by-Side configuration information for "D:\Software\DICE.EXE" contains errors. This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem (14001)."
It does now show the two DLL's as available though.
Quote:Original post by skittleo
I remember having that problem once too. For now, can you just place those dlls in the same folder as your application when you give it out? But I wonder if you could statically link those libraries...


Yes it's possible.

Correct me if I'm wrong but you can set the runtime library to MT in the application properties:

http://img471.imageshack.us/img471/1461/staticlibraryay1.jpg

Then Visual Studio will include all files :)
That's perfect Vinniee, it is now working!

Thank you all for your replies.

This topic is closed to new replies.

Advertisement