Solved

MFC Error when run

Posted on 2006-11-10
25
436 Views
Last Modified: 2013-11-25
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
Comment
Question by:Cyber-Drugs
  • 13
  • 8
25 Comments
 
LVL 4

Author Comment

by:Cyber-Drugs
ID: 17918970
If it helps at all, this is the Code which is giving me this problem:

http://www.codeproject.com/internet/CustomBrowser.asp
0
 
LVL 86

Expert Comment

by:jkr
ID: 17919763
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
 
LVL 8

Expert Comment

by:deepu chandran
ID: 17920807
hi,

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

Deepu
0
 
LVL 4

Author Comment

by:Cyber-Drugs
ID: 17929061
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
 
LVL 4

Author Comment

by:Cyber-Drugs
ID: 17930421
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
 
LVL 86

Accepted Solution

by:
jkr earned 500 total points
ID: 17930608
.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
 
LVL 4

Author Comment

by:Cyber-Drugs
ID: 17930759
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
 
LVL 4

Author Comment

by:Cyber-Drugs
ID: 17933684
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
 
LVL 86

Expert Comment

by:jkr
ID: 17933724
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
 
LVL 4

Author Comment

by:Cyber-Drugs
ID: 17933759
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
 
LVL 86

Expert Comment

by:jkr
ID: 17933799
MPR.DLL is not important (the sand-timer stands for 'delay load') - but, are you testing that on the non-development machine?
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 4

Author Comment

by:Cyber-Drugs
ID: 17933829
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
 
LVL 4

Author Comment

by:Cyber-Drugs
ID: 17934206
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
 
LVL 86

Expert Comment

by:jkr
ID: 17934288
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
 
LVL 4

Author Comment

by:Cyber-Drugs
ID: 17934415
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
 
LVL 4

Author Comment

by:Cyber-Drugs
ID: 17934455
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
 
LVL 86

Expert Comment

by:jkr
ID: 17935322
Are you sure you switched to release for all the components involved?
0
 
LVL 4

Author Comment

by:Cyber-Drugs
ID: 17936775
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
 
LVL 86

Expert Comment

by:jkr
ID: 17940756
No, I thopught that the project might create more than one binary, thus the question.
0
 
LVL 4

Author Comment

by:Cyber-Drugs
ID: 17942024
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
 
LVL 86

Expert Comment

by:jkr
ID: 17942145
Are you sure you then transferrred the release binary to the other machine? They're created in different folders, "Debug" and "Release".
0
 
LVL 4

Author Comment

by:Cyber-Drugs
ID: 17945568
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

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now