Link to home
Start Free TrialLog in
Avatar of brightwood
brightwood

asked on

application configuation is incorrect ?

Ive developed a program in VC++ 2005, builded it with options Release for win32. I gave the .exe to a friend and he got this error.

this application has failed to start because the application configuation is incorrect. reinstalling the application may fix this problem

But it works perfect on my computer.

Whats wrong ? what application configuation ?
Avatar of Axter
Axter
Flag of United States of America image

What's your friend's OS, and does he/she have the latest updates?
Avatar of brightwood
brightwood

ASKER

Xp, same as me. He have sp2. All updates problably, same as me again.
But is it such platform dependant ? I mean won't my little program run on a win98 for example ?
Are you performing a 'Release' build? If not, it is most likely that your friend does not have the required debug runtime DLLs, thus the error.
Yes as i said, ive done a "Release" build.
SOLUTION
Avatar of jkr
jkr
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
>>But is it such platform dependant ?

You can create code that requires a minimum platform.  There are many applications that will not work on Win98/95.

What type of application did you build?
its a MFC dialog application. really nothing complicated.
Hmm, you better take a look at http://msdn2.microsoft.com/en-us/library/ms235299(VS.80).aspx ("Redistributing Visual C++ Files") and http://msdn2.microsoft.com/en-us/library/8kche8ah(VS.80).aspx ("Determining Which DLLs to Redistribute ") in particular.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
>>I recommend you compile MFC statically.

That's what I already wrote above, but the same applies to the CRT. But anyway, both usually creates a bloated executable.
Axter, its same in vc++ 2005. And it works now on 2 of my friends computers. I wonder if it will work on a win98 also. Too bad I can't test it at this moment.
>>That's what I already wrote above

I should have said to add to jkr's comment.
Anyway, I don't like static linking, since it is known to become a major pain when more functionality is added (The "multiple ... symbols defined ... nafxcwd" nightmare)
Hm, shouldn't that have been more like a split, regarding the comment history?
I agree with jkr.

brightwood, can you please request to split the points?
FYI:
An alterantive to linking statically to MFC, is to copy the mfc*.dll files to your friends computer.  The dll files should go in the C:\windows\system32 path or the path of the executable.

If you look at your build machine, you'll seel mfc DLL's like the following:
mfc40.dll
mfc42.dll
mfc70.dll
MFC71.dll

But IMHO, it's far easier just to link statically.
If i link statically all this dll's gets included into the .exe right ?
Sure ill request that, link me where to.
Yes. But it's not only MFC you need, also the CRT.
Regarding the CRT part - in your project settings, under 'Code Generation', select 'Runtime Library' to an appropriate option that does *not* lit 'DLL'
Do that then jkr :)

My runtime library its set to "Multi-threaded (/MT)"

So, by just link statically my program should work under win98 too ?
Let's say that the chances are better. If the new MFC versions use APIs that aren't present or defunct on Win9x (and there could be a lot), it might not work either.
Oh, BTW - regarding Axter's pointer to the DLLs: You can also use the DependencaWalker from www.dependencywalker.com to check which DLLs are missing on the target machine.