tags:

views:

173

answers:

2

I'm working on a command prompt roguelike in VisualC++ 2008, and everything compiles all fine and dandy, but there's one glaring issue that I have with it.

Why is it that if I change the name of the exe, the program fails completely? I don't think that's supposed to happen with most programs

A: 

It doesn't happen unless the program itself is designed to check its own exe's name and behave differently accordingly. You need to post some code.

Jim Buck
I never specified anything like this within my code, I believe it has something to do with the project options but I don't know what it is. When I change the name I get this error:This application has failed to start because MSVCR90D.dll was not found.
+3  A: 

It's most likely because of the manifest file - you'll either need to rename the manifest file as well or embed it into the exe, see http://support.microsoft.com/kb/944276

cmeerw
Ah, thank you, I understand that, and that much IS resolved. However, I do have one additional problem here. I'm trying to distribute the EXE to some friends, but they get "side by side" configuration" errors or "app config is incorrect."I want to compile it in /MT, but it gives me all kinds of crazy linker errors, and I don't want to use /MTd because it makes the file size huge.
Can you give some examples of these crazy linker errors?
cmeerw
you are trying to link the non-debug c runtime with your program which was compiled for the debug c runtime. are you compiling /MT and defining _DEBUG?
sylvanaar
You have runtime library conflicts... see this MSDN article for more information.http://msdn.microsoft.com/en-us/library/6wtdswk0(VS.80).aspx
Soo Wei Tan
Also, if you are sending your friends a debug .exe, and they don't have Visual Studio installed, then you need to also send them the debug runtime .dlls.
Jim Buck
IANAL, but I think it is against the VS EULA to distribute debug runtime DLLs.If you have any more "Application configuration" issues, you probably need them to have the appropriate VC runtime redistributable file. It's part of your VS installation or available on Microsoft's website.
Soo Wei Tan