• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 454
  • Last Modified:

MFC Error when run

Hi guys,

I've just compiled an MFC Application (was created in version 6, upgraded it to 2005).

It works perfectly on my machine, but on other machines, when run it displays:


<<path to file>>
This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix the problem.



Any ideas on what could be causing this to happen?


Cheers guys 'n gals!
0
Cyber-Drugs
Asked:
Cyber-Drugs
  • 13
  • 8
1 Solution
 
Cyber-DrugsAuthor Commented:
If it helps at all, this is the Code which is giving me this problem:

http://www.codeproject.com/internet/CustomBrowser.asp
0
 
jkrCommented:
If the other machine does not have Visual Sutio installed, you will have to make sure that a) you are trying to run a Release build (as opposed to a Debug build) and that b) all the necessary runtime DLLs are present, see http://msdn2.microsoft.com/en-us/library/ms235264.aspx ("Redistributing the MFC Library")
0
 
deepu chandranCommented:
hi,

Visual studio 2005 you are using right.MAke sure that the other pc has .net framework installed or not

Deepu
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
Cyber-DrugsAuthor Commented:
Hi guys,

The machine I tested it on was Windows XP Professional (not at the machine at the moment, but pretty sure it's Service Pack 2). Wouldn't this already have the .NET Framework installed, or is there a later version required for 2005?

Cheers!
0
 
Cyber-DrugsAuthor Commented:
Hi guys,

I just double checked, and the machine has the .NET Framework 2.0 installed on it already. What else would you say I should install?


jkr,

I read your link, and it said I'm meant to have something installed, but what? I've got the .NET Framework 2.0 installed, and the code is Compiled in Release Build, but still gives me this error...
0
 
jkrCommented:
.NET is not necessary for a MFC app. What you need are the runtime libraries. Get The DependencyWalker (www.dependencywalker.com) and open your program with that tool on the other machine. It'll report which DLLs are missing and need to be installed.
0
 
Cyber-DrugsAuthor Commented:
Hi jkr,

That looks like a VERY impressive application, I'll give it a go in an hour, I need to finish off some work first.

Cheers!
0
 
Cyber-DrugsAuthor Commented:
Hi jkr,

It's showing me a lot of DLL's, but not sure really how to make use of this application, could you possibly give me a quick run-through of what I am supposed to look at, to verify which files are required? Or is there possibly a way of create an Install of this EXE which will automatically include any DLL's required on other machines?


Cheers!
0
 
jkrCommented:
All you need to do is to check for DLLs that are reported as "missing". These are displayed with a red icon. I am pretty sure that Msvcr80.dll and Mfc80.dll will be among them.
0
 
Cyber-DrugsAuthor Commented:
OK, well the only ones I have coming up as missing are:

EFSADU.DLL
MSJAVA.DLL

but I also have this one in red with a sand-timer:

MPR.DLL
0
 
jkrCommented:
MPR.DLL is not important (the sand-timer stands for 'delay load') - but, are you testing that on the non-development machine?
0
 
Cyber-DrugsAuthor Commented:
Valid point, sorry jkr, I tested that on the machine which has Studio 2005 on it.

I'll test it on the other machine now, and reply shortly with the results.
0
 
Cyber-DrugsAuthor Commented:
I'm getting:

MFC80D.DLL
MSVCR80D.DLL
MSJAVA.DLL
MPR.DLL


and got:

Error: At least one required implicit or forwarded dependency was not found.
Error: The Side-by-Side configuration information in "c:\documents and settings\justin\desktop\CUSTOMBROWSER.EXE" contains errors. This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem (14001).
Warning: At least one delay-load dependency module was not found.
Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.
0
 
jkrCommented:
Hm, the trailing 'D' indicates a debug build - that you cannot run on machines that do not have VC++ installed. Switch to a Release build first.
0
 
Cyber-DrugsAuthor Commented:
Sorry, I ran the program on the Debug version by accident. I will try again on the Release build now, and paste the results shortly...
0
 
Cyber-DrugsAuthor Commented:
I just went to:

Build->Configuration Manager

and it says:

Project, Configuration, Platform, Build
CustomBrowser, Release, Win32, True


And I still get the 'D' which you said indicated a debug build. Am I doing something wrong?
0
 
jkrCommented:
Are you sure you switched to release for all the components involved?
0
 
Cyber-DrugsAuthor Commented:
Hi jkr,

I made a presumption that what I did was for the entire project rather than for each component, do I need to open each *.cpp/*.h file and do the same?
0
 
jkrCommented:
No, I thopught that the project might create more than one binary, thus the question.
0
 
Cyber-DrugsAuthor Commented:
It created one EXE file, I deleted the old one first, and that was the output. Would the best method just be for me to package the EXE into an Installer which will automatically attach all required files rather than trying to hunt down additional files?
0
 
jkrCommented:
Are you sure you then transferrred the release binary to the other machine? They're created in different folders, "Debug" and "Release".
0
 
Cyber-DrugsAuthor Commented:
Very good point, I was looking in the wrong folder...

When I get a chance, I'll send over the correct file and try again.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

  • 13
  • 8
Tackle projects and never again get stuck behind a technical roadblock.
Join Now