Reputation:
VC++ 6.0 Project
After Completing my project i created the project EXE ,using Create Installer,
But the problem is without vc++ 6.0 software the EXE project it will not execute ,
it shows error:
This application has failed to sart because MFC42.DLL has not found,Re-installing the application may fix this.
When i insatll vc++ 6.0 software then it will fine no error.
plz any body help me that the without the vc++ 6.0 s/w the project must be execute.
or plz tell me how to make the project EXE(setup)
Upvotes: 2
Views: 826
Reputation: 250
If your application depends on the Visual C++ runtimes you can include them as part of your installer to simplify the installation experience for your end users. This how to describes including the Visual C++ runtime merge modules into your installer and explains the expected ICE warnings you will see.
Step 1: Obtain the correct Visual C++ runtime merge modules The Visual C++ runtime merge modules are installed with Visual Studio and are located in \Program Files\Common Files\Merge Modules. The Visual C++ 8.0 runtime file is Microsoft_VC80_CRT_x86.msm. This same MSM is used for the Visual C++ 8.0 SP1 runtime, however it is updated in place by the Visual Studio 2005 SP1 installer. The Visual Studio 9.0 runtime file is Microsoft_VC90_CRT_x86.msm. There is generally no need to include the policy MSMs as part of the installation.
Step 2: Include the merge module in your installer To include the merge module in your installer use the and elements. The following example illustrates how these elements are used.
The Merge element ensures the merge module is included in the final Windows Installer package. A unique id is assigned using the Id attribute. The SourceFile attribute points to the location of the merge module on your machine. The DiskId attribute should match the DiskId specified in your project's Media element. The Language attribute should always be 0.
The MergeRef element is used within a Feature element to actually install the merge module. In the example above a feature specific to the runtime is created and marked as hidden to prevent it from displaying in any UI your installer may use. The MergeRef refers to the merge module by its unique id.
Upvotes: 1
Reputation: 43376
You might want to consider moving to a more widely used installation utility. A lot of open source projects (and a fair number of commercial projects as well) use InnoSetup to build installers.
Regardless of the tool you use, the general process is the same.
depends.exe
tool that came with Visual Studio to learn what DLLs are required.) Don't forget about help files and samples.Testing installations can be difficult, and really should be the subject of a whole other question. Be careful that what is installed can be uninstalled, and that running the installer again does something sensible. It may also be a good idea to make sure that you have a way to detect if a user is trying to install an update while an older copy is still running, and to take an appropriate action when that happens. (It will.)
Upvotes: 1
Reputation: 400159
Check if mfc42.dll is freely distributable. I think it's part of Microsoft's runtime libs, and thus should be legal to redistribute, but you need to verify this (unless someone else can verify it).
Then just include that dll with your setup, so that the dll is in the same folder the exe is started from.
Upvotes: 1