Question about the listprocess project in chapter 7 of windows mobile app development

Source: Internet
Author: User

Open the project directly with EVC 4, and the following error occurs in bulid:
-------------------- Configuration: listprocess-Win32 (wce emulator) debug --------------------
Linking...
Listprocessdlg. OBJ: Error lnk2019: unresolved external symbol _ process32next referenced in function "protected:

Void _ thiscall clistprocessdlg: onbutton1 (void )"(? Onbutton1 @ clistprocessdlg @ iaexxz)
Listprocessdlg. OBJ: Error lnk2019: unresolved external symbol _ process32first referenced in function "protected:

Void _ thiscall clistprocessdlg: onbutton1 (void )"(? Onbutton1 @ clistprocessdlg @ iaexxz)
Listprocessdlg. OBJ: Error lnk2019: unresolved external symbol _ createconlhelp32snapshot referenced in Function

"Protected: void _ thiscall clistprocessdlg: onbutton1 (void )"(? Onbutton1 @ clistprocessdlg @ iaexxz)
Emulatordbg/listprocess.exe: Fatal error lnk1120: 3 unresolved externals
Error executing link.exe.
However, if the files are compiled one by one, there is no error
Fortunately, this error is experienced-the library file corresponding to the above functions is missing
I have also read p130 in "EVC advanced programming and application development" and mentioned this library file toolhelp. Lib.

Therefore, you only need to add project settings --> link --> Object/library modules under ide:
Toolhelp. Lib
Done!

In addition, you must add the following statement in the stdafx. h file, if not:
# Include <tlhelp32.h>
Note: This is not necessary. I only made the above changes in the IDE, and there is no problem in running it.
Build, the figure after running by button1 is as follows:

The strange thing is why the book did not mention such important details.

Related Article

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.