The external symbol _ winmain @ 16 that cannot be parsed is referenced in the ___ tmaincrtstartup function. solution:

Source: Internet
Author: User
I. Problem Description

Msvcrtd. Lib (crtexew. OBJ): Error lnk2019: external symbol that cannot be parsed _ winmain @ 16, which is referenced in function ___ tmaincrtstartup
Debug \ jk.exe: Fatal error lnk1120: 1 external command that cannot be parsed

Error lnk2001: unresolved external symbol _ winmain @ 16
Debug/main.exe: Fatal error lnk 1120:1 unresolved externals
Error executing link.exe;

Ii. Possible causes

The real cause of this problem isC LanguageThe appropriateProgramEntry function. Generally, if it is a Windows program, winmain is the entry function. If it is a DOS console program, main is the entry function. If the entry function is not properly specified, obviously, when the C language runs, it will report an error if the function cannot be found.

Possible:

1. You have created a console program with VC. Its entry function should be main, and you have used winmain.

2. You opened a. c/. cpp file with VC, and then compiled the file directly. This file uses winmian instead of main as the entry function. The default setting of VC is for console programs.

3. There is no winmain or main function at all.

3. Solution

1. Go to project> setting> C/C ++, select Preprocessor from category, delete _ console from processor definitions, and add _ WINDOWS

2. Go to project-> setting-> link and change/subsystem: console to/subsystem: Windows in project options.

3. Save the settings and rebuild all.

--------------------------- Convert

Mine: Add main ()

 

Another external symbol that cannot be parsed

 

This is because the method declared in. H is not defined in. cpp.

 

 

 

Another external symbol that cannot be parsed, "_ declspec (dllimport ).... If Lib is not properly configured, you need to add the corresponding XXX. Lib in the project properties-> linker-> input-> additional dependency library.

In addition, we encountered another external symbol that could not be parsed by. obj. Find the corresponding lib and add it to the dependent library.

And again and again... This is because many lib versions are out of order.

 

 

From: http://www.cnblogs.com/minggoddess/archive/2010/12/15/1907180.html

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.