Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 356
  • Last Modified:

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 ?
0
brightwood
Asked:
brightwood
  • 10
  • 7
  • 6
2 Solutions
 
AxterCommented:
What's your friend's OS, and does he/she have the latest updates?
0
 
brightwoodAuthor Commented:
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 ?
0
 
jkrCommented:
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.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
brightwoodAuthor Commented:
Yes as i said, ive done a "Release" build.
0
 
jkrCommented:
>>I mean won't my little program run on a win98 for example ?

If you compiled it with VS 2005, probably not, since the runtime is not present at all, not even in Release mode. You might have to write to write an installer, unless you choose to link everything statically. The latter includes both the CRT and the MFC libs.
0
 
AxterCommented:
>>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?
0
 
brightwoodAuthor Commented:
its a MFC dialog application. really nothing complicated.
0
 
jkrCommented:
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.
0
 
AxterCommented:
>>its a MFC dialog application. really nothing complicated.

I recommend you compile MFC statically.
I'm not sure about the exact option location for VC++ 2005, but in VC++ 2003, you can set this option by right clicking your project in the solutions window, and then select properties.
Then select "general" which is listed right under the "Configuration Properties" tree.
Look for  a field called "Use of MFC"
Change this field to "Use MFC in a Static Library".

If you're using ALT, do the same.
0
 
jkrCommented:
>>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.
0
 
brightwoodAuthor Commented:
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.
0
 
AxterCommented:
>>That's what I already wrote above

I should have said to add to jkr's comment.
0
 
jkrCommented:
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)
0
 
jkrCommented:
Hm, shouldn't that have been more like a split, regarding the comment history?
0
 
AxterCommented:
I agree with jkr.

brightwood, can you please request to split the points?
0
 
AxterCommented:
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.
0
 
brightwoodAuthor Commented:
If i link statically all this dll's gets included into the .exe right ?
0
 
brightwoodAuthor Commented:
Sure ill request that, link me where to.
0
 
jkrCommented:
Yes. But it's not only MFC you need, also the CRT.
0
 
jkrCommented:
Regarding the CRT part - in your project settings, under 'Code Generation', select 'Runtime Library' to an appropriate option that does *not* lit 'DLL'
0
 
brightwoodAuthor Commented:
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 ?
0
 
jkrCommented:
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.
0
 
jkrCommented:
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.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 10
  • 7
  • 6
Tackle projects and never again get stuck behind a technical roadblock.
Join Now