The reason for the error is as follows:
① You use other people’s libraries, such as opencv library, OpenGL library and other third-party libraries. The common situation is that you only include the header file, but there is no import file
② You don’t use other people’s libraries. Some of Microsoft’s own libraries may also have such problems. At this time, the common situation is that the header file of the failed function is in the included directory of the project property, but the corresponding library file is not in the default library directory of the project property. For example, create view glcontext (struct HDC) in FAQ style__ *) function is such a case. This function is defined in the header file wingdi. H. This header file is in the default included directory in the project properties, but the corresponding library file opengl32. Lib is not in the library directory
③ You use your own library file. I haven’t tried this situation. I’ve seen some comments on the Internet
Fatal error lnk1120 cause:
① . contains only the header file, only the declaration of this function, but not the implementation of this function (the implementation is generally placed in the cpp file). So it can only be compiled, and the connection is not successful.
② Another reason is that the declaration and implementation of the function are put in the header file. Generally, the declaration should be put in the header file and the implementation in the cpp file. In this way, each file that contains the header file will have an implementation of the function. When connecting, the connector does not know which implementation to connect, so an error is reported.
Read More:
- fatal error LNK1120: 1 unresolved externals
- How to Fix Fatal Error lnk1120: 1 unresolved externals
- fatal error LNK1169: one or more multiply defined symbols found
- Link: fatal error lnk1123: failure during conversion to coff: file in
- LINK : fatal error LNK1168: cannot open Debug/1.exe for writing
- Link: fatal error LNK1104: cannot open file “debug”/ xx.exe The question of
- Error 1 fatal error LNK1220: ‘/PGD‘ requires ‘/LTCG:[PGINSTRUMENT|PGOPTIMIZE]‘ specification
- LinkIssue: Error ‘LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or cor
- VS2010 error: LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
- Problems caused by vs project build order: link: fatal error lnk1181: cannot open input file ‘zoom’_ Ui_ style.lib ‘
- Visual Studio 2010 compilation error fatal error lnk1123: failed during conversion to coff: solution to invalid or corrupt file
- error LNK2038: mismatch detected for ‘RuntimeLibrary’: value ‘MTd_StaticDebug’ doesn’t match value ‘
- Error lnk1120: 2 unresolved external commands: vtkrenderingopengl_ Autoinit (construct, destroy), which is referenced in
- LNK2001: unresolved external symbol maincrtstartup
- Error LNK1169: one or more multiple defined symbols were found
- error LNK2019: Unresolved external symbol-resolution record
- LINK : error LNK2001: unresolved external symbol _mainCRTStartup
- Error lnk2038: detected “0”_ ITERATOR_ DEBUG_ The reason and solution of the unmatched item of “level”