I have an MFC application that runs on my computer, but when I try to run it on another PC I receive an error message that the application failed to initialize and I should re-install it. W开发者_开发知识库hat should I do?
See redistributing an MFC application from MSDN.
Generally you could install the Redistributing Visual C++ package for x86.
You can also compile your program to statically link the MFC dlls for easier deployment.
The problem is that the other computer is missing the C/C++ runtime libraries. Install the version of the Microsoft Visual C++ runtime that matches the version of Visual C++ that you used to compile it on the other computer.
Alternatively, you can link the application statically. Right click on the project in the Solution Explorer and choose Properties, then naviagate to C/C++ > Code Generation > Runtime Libraries. Choose the Debug/Release option that doesn't include "DLL".
You can link static or install the VC++ Redistributable Pack.
You are missing some of the libraries, either link the application statically or install the VS redistributables on the other computer
See http://www.microsoft.com/downloads/details.aspx?FamilyID=9b2da534-3e03-4391-8a4d-074b9f2bc1bf
If you get a message like "side-by-side configuration error", that means your exe must be shipped some extra files, probably MFC / ATL dlls. Use dependency walker to find out what are the dependencies : http://www.dependencywalker.com/
精彩评论