Link: Fatal error lnk1104: cannot open file "mfc42d. Lib"

Source: Internet
Author: User

I want to simulate and debug the EVC program, but this error always occurs after the SDK is installed.

In addition, you can select the app and use MFC.

Re-install the SDK. No ......

I have re-installed EVC, but I still cannot ......

I checked it online and said it was a unicode problem.

~~ Learning!

 

Web: http://faq.csdn.net/read/209407.html

Problem description: program error: Link: Fatal error lnk1104: cannot open file "mfc42ud. lib". What is the problem?


Answer:
RT
---------------------------------------------------------------

Include it in the compilation path
---------------------------------------------------------------

That is the Lib of mfc4.2 Unicode Debug. In fact, if your program does not require Unicode, you can change the compiling mode, such as Win32 debug/release. If you want this Lib, I sent it to you, EnochShen@QQ.com
---------------------------------------------------------------

Unicode-supported files are missing. Unicode-supported files are not installed by default during the installation of MFC. You only need to start the installation program of VC and select the Unicode-supported option, you can install it again. If it is too troublesome, you can simply choose to install it all. Now the disk is very large and you can install it all. Maybe something is missing at any time. (I also chose full installation, but why not ?)

If it is still troublesome, compile the release version EXE directly. This file is only used by the Unicode program of the debug version. (This is true)
---------------------------------------------------------------

Unicode mode to be installed
---------------------------------------------------------------

It is not installed by default. You can test the mfc42d. Lib in the VC lib directory in the installation folder in one directory.

 

 

 

Later, I checked the solution.

Http://topic.csdn.net/u/20070205/15/beb2ed15-2d53-4eff-99b1-f3576a1bc665.html

 

What should I do if cannot open file 'mfcs42d. lib' appears in evc4.0 ??

 

I have created a dialog box-based MFC, but the following error occurs when compiling:
Link: Fatal error lnk1104: cannot open file 'mfcs42d. lib'
I don't know how to solve this problem ??

 

Are you using a standard simulator? Or a custom SDK? You didn't add the MFC component!

 

I am using a simulator. Should I add the MFC component? Please be specific. Thank you

 

If it is a self-built simulator, you should pull the MFC component. Dubug and release should also be selected.

 

Click "Tools"> "options"> "directory"> "show directory"> "library files ".
There will be three channels below
You can change the following two final emulator to x86 wipe (this is a good trick, but why ?)

 

Try upstairs. If not, check the project-setting, which contains link items. Unknown lib file. check whether it is in it.

 

Thank you, wdllin!
Could you tell me what is going on? What is the difference between changing emulator to x86?

 

'Mfcs42d. lib' is the corresponding library in the debug version. Your SDK may be release. Switch your project type to release.

 

And a http://topic.csdn.net/u/20070205/15/beb2ed15-2d53-4eff-99b1-f3576a1bc665.html.

 

 

Summary:

 

Lab 1:

Generate an emulator: x86 SDK (release) and emulator: x86 SDK (Debug) respectively, and install

The cannot open file "mfc42ud. lib" error will occur.

Modify the settings as follows: Tools-> options-> directory-> show directory-> library files, and change the following two emulator to x86.

Can be compiled through

 

Lab 2:

Select the CPU for the created EVC Project

When you select emulator, if you do not make the above changes, the error "mfc42ud. lib" will appear.

When x86 is selected, it can be compiled (although it cannot be simulated)

 

Lab 3

View the SDK installation directory

C:/program files/Windows CE tools/wce500/emulator/mfc/lib/x86

C:/program files/Windows CE tools/wce500/emulator/ATL/lib/x86

Only the x86 Folder does not have emulator.

 

Conclusion:

I don't know why. The simulated SDK of the simulator only has x86 CPU library files and does not have a library for emulator. Therefore, the link cannot be found in C: /program files/Windows CE tools/wce500/emulator/ATL/lib/emulator or C: files in/program files/Windows CE tools/wce500/emulator/mfc/lib/emulator may encounter errors.

In short, there must be a corresponding file under the corresponding folder

 

 

 

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.