Sign in to follow this  
r4d4

Correct VC++ Redistributable

Recommended Posts

r4d4    102
[size="4"]I'm developing games using visual studio 2005 and when I try the app on other computers Im getting the error message, "applicaiton failed to start because the configuration is incorrect".

Now I had been working on one game which was working fine ,all I needed was the directX DLL.
Before I started this new game, I do remember installing an old game off steam which installed some redistribultable packages.
It seems pretty obvious that this is what has caused me to now be getting this error. I know that you can mess around with manifests and all that but I find that difficult to understand and Im sure that I just need to reinstall some of this resdistributable stuff, or uninstall some.

Can anyone tell me which package I need to install? I am on windows vista, here is what windows says I have installed right now:

Microsoft Visual Studio C++ 2005 ATL update kb973923 x86 8.0.50727.4053 251KB
Microsoft Visual Studio C++ 2005 Redistributable 2.69MB
Microsoft Visual Studio C++ 2005 Redistributable 337KB
Microsoft Visual Studio C++ 2008 ATL update kb973924 x86 90.30729.4148 199KB
Microsoft Visual Studio C++ 2008 Redistributable x86 9.0 21022 1.41MB
Microsoft Visual Studio C++ 2008 Redistributable x86 9.0 . 30729.17 590KB
Microsoft Visual Studio C++ 2008 Redistributable x86 9.0 30729. 4148 587KB
[/size]

Share this post


Link to post
Share on other sites
Dunge    405
You probably sent the debug executable to someone who don't have Visual Studio installed on their machine. Visual C++ debug libraries can't be redistributed legally. Better compile your program (and every dependency) as release mode.

Otherwise, use [url="http://blogs.msdn.com/b/junfeng/archive/2006/04/14/576314.aspx"]this[/url] guide (halfway it start for Vista) to check which one is missing on the other computer.

Share this post


Link to post
Share on other sites
r4d4    102
No, I was testing the release build.

The thing is my old code was running on all these other computers before (and in fact still does). its only the newly compiled program which won't run. Its something thats installed or uninstalled on my development PC that has messed things up.

Share this post


Link to post
Share on other sites
Dunge    405
If you can't run a program on the same PC that is was compiled, that means you are using some static library (.lib files) that was compiled under a different version of Visual Studio (and probably in debug since you seems to have most redistribuables except 2010 already). You will probably have to recompile that .lib.

Share this post


Link to post
Share on other sites
r4d4    102
It works on the dev pc but thats all

What are the options for installing this stuff? Maybe I can just try every one in turn till it works again

Share this post


Link to post
Share on other sites
Dunge    405
I already linked a guide about using sxstrace to read which dependency are missing, don't go trial and error. I'm even willing to bet with you that it gonna ends up being Microsoft.VC*0.DebugCRT and these files CAN'T be downloaded/redistributed without visual studio.

Share this post


Link to post
Share on other sites
r4d4    102
I read that guide but I am trying to run the program on XP mainly. It is the development pc that has Vista.

I tried reinstalling VC++ resdist 2010 on my dev PC then recompiling (releas mode) and running that on the XP machine. Error was the same so I installed the redist on the XP machine and then tried. Again, error was the same. I looked at the event log and it said "dependant assembly VC80 CRT could not be found"



This is sooo annoying I know my programs were running fine on these machines before and nothing has changed. Yeah the code is different but only gereric loops and switches. The graphics engine is the same, the audio engine is the same, the way the game works is the same. the ONLY thing that has changed is the configuration of my development PC

Share this post


Link to post
Share on other sites
r4d4    102
I tried installing VC++ redist 2008 on the target machine aswell but no change.



For me this only confirms what I already knew, the target machine is fine to run my program if I can get it compiled correctly. What is going on???

Share this post


Link to post
Share on other sites
Dunge    405
Installing redist on the dev machine (that is already working) is useless. Redists are used to run application, not to build them. Your target PC is WinXP, and the first part of the guide was for XP, where's the problem? You checked the event log and it say missing VC80 CRT well that's what you wanted to know. VC80 = Visual Studio 2005. Install the Visual Studio 2005 redist on the target machine. Which version exactly (2005, 2005 SP1 or 2005 SP1/ATL package) is depending on the version number you saw in that event log, and also on the version of Visual Studio you used to build your application/dependencies. At least it's not debug, so you should be fine.

Share this post


Link to post
Share on other sites
iMalc    2466
I suggest simply adding _BIND_TO_CURRENT_VCLIBS_VERSION to your project preprocessor macros and then your app will use whatever VS 8 runtime is installed on the machine.
See [url="http://msdn.microsoft.com/en-us/library/cc664727(v=vs.90).aspx"]here[/url].

Share this post


Link to post
Share on other sites
r4d4    102
I tried installing all 3 of those redistributables in turn and still got the same error message and the same message in the event log.

I tried adding the BIND_TO_CURRENT_VCLIBS_VERSION and again it makes no difference.

Im still convinced that my program shouldnt even need these installations whatsoever. I mean, it must be the case that not all programs need these redistributables right?
As none of this has worked and Im convinced its my visual C and/or system config that is causing the problem I might just uninstall visual C and the redists and remake my project and try it then,

Share this post


Link to post
Share on other sites
r4d4    102
I unembedded the manifest and it is as follows. Anyone any idea which resdist I should need to match this?

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.VC80.CRT" version="8.0.50727.5592" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
</dependentAssembly>
</dependency>
</assembly>

Share this post


Link to post
Share on other sites
iMalc    2466
The instructions I found above were for VS2008 sorry, the individual defines on that page should work for VS2005, just not hte combined one.

Wait, you do know that you can link the code from those libs into your project so that you don't even need to redistribute them right? Just change from multithreaded DLL to multithreaded, and statically link to ATL or MFC as well (as required), in the project options. Use depends.exe for verify what DLLs it still requires.

Share this post


Link to post
Share on other sites
r4d4    102
Yes after searching around the net I realised I could static link the libraries /MT and that works. I feel a bit cheap for doing that but at last it runs for now I guess. It doesnt require any DLLS..

As an aside, I asked my friend about this who is a pro games programmer and he suggested writing my own manifest. That way I control which files are required. Probably a good suggestion but to be honest I dont really know see why the one I unembedded isn't good enough, if only I knew which version it refered to. I could try writing my own I would need some kind of tutorial.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this