Loadlibrary (XXX. dll) fails to return 14001 because the application fails to start due to incorrect application configuration. Re-installing the application may correct this question.

Source: Internet
Author: User
Tags vc runtime

Reprinted please indicate that it is referenced inHttp://blog.csdn.net/chenyujing1234 

You are welcome to make a brick!

1. The application background is that vs2008 is successfully compiled in win7 and runs normally. Program : EXE + DLL;

Put it on the XP Virtual Image and run the command: loadlibrary returns 14001.

(1) later I used the"Method 1"Solved.

(2)However, the distribution package corresponding to vs2008 must be installed on the basis of method 1.Vcredist_x86.exe

(This file is provided in the vs2005 installation directory, but not available in vs2008, but can be downloaded online ).

ReferenceArticle:

Http://hi.baidu.com/roger_long/item/867a7cf6fd8cf4cc521c26c5

Ii. Online materials

Some machines have such problems, and some do not! Some controls have no problems, and some have problems. In the past, project managers were responsible for installation and testing, and I never cared about such problems. Currently, companies do not have such full-time positions. Come on your own.

This problem occurs based on experience, and dynamic link DLL is certainly a problem.
1. Use depends on the machine where the control can be used. We found that the CRT was installed to run the program.
2. No CRT is installed on a machine that does not work.
3. Why is there a control that can be run even if no CRT is installed, but all of them are statically connected to the ATL
4. Copy the xp crt dll to 2003, but it still does not work (maybe 2003 is different from the xp crt, and you have not tried it again)
5. Find the answer online. "loadlibrary failed because the application is incorrectly configured and the application failed to start CRT"

========================================================== ==========================================
Solution:

Method 1:

Find the following files in c: \ Program Files \ Microsoft Visual Studio 8 \ Vc \ redist \ debug_nonredist \ x86 \ microsoft. vc80.debugcrt:

Msvcm80d. dll
Msvcp80d. dll
Msvcr80d. dll
Microsoft. vc80.debugcrt. manifest

Copy these files to the target machine,The same folder as the running program or put it under system32To run the program.

For other release versions, the MFC program can copy the files in the corresponding folder under redist, And the folders are marked!

Note:

(1) For vs2008, find the file in the path c: \ Program Files \ Microsoft Visual Studio 9.0 \ Vc \ redist \ debug_nonredist \ x86 \ microsoft. vc90.debugcrt.

(2) If it is placed under system32, you need to change the system environment variable.

Method 2:
Modify the compilation option and change/MD or/MDD to/Mt or/MTD.Static link to the VC Runtime Library, Vc dll is no longer needed at runtime.

Method 3:

Project-> properties-> Configuration properties-> General-> Use of MFC, select "use MFC in static library"
The generated EXE file can be run on other machines.

Method 4:

Find and resend the vcredist_xxx.exe package on your vc8installation disk and install it with your program.

Method 1: The Microsoft. vc80.debugcrt. manifest file was successfully downloaded.
Method 2: This method is the best to adapt to multiple projects.
Method 3: Applicable to MFC
Method 4: relatively large projects are better!

 

Iii. Expansion

 

Solution:

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.