Handling---> Error LNK2019: unresolved external symbols "~ ~ ~ ~" | The symbol "~ ~ ~" is referenced in the function _main
--------------------------------------------------------------------------------------------------------------- -----------------
First Spit: Brother-in-law! Learning data structure (C language description), I thought you can not use the vc6++ ugly and incompetent IDE, this time to replace vs feel more comfortable, not many or encountered a little bumps, a bit annoying.
--------------------------------------------------------------------------------------------------------------- -----------------
In fact, C language to run the compilation mechanism I do not understand.
This two-day request to write a data structure job, in order to achieve interface and implementation of separation, the requirements structure is as follows:
Statement of the structure and operation method of the LinkList.h containing the linked list
Details of linklist.c containing linked list operation methods
MAIN.C main function file, including methods for linked list operations
--------------------------------------------------------------------------------------------------------------- -----------------
Internal code does not paste ....
Main.c include "LinkList.h"
LINKLIST.C because you need to reference the list, also include "LinkList.h"
--------------------------------------------------------------------------------------------------------------- -----------------
C language Compilation process reference here, http://mcuos.com/thread-3793-1-1.html
The approximate compilation process on the above four processes: precompiled, compile, assemble, link.
So here's the "wrong error LNK2019" on the link process bar.
The function declaration is always found in the main function, but the definition of the function is not found.
Grandma's, this year Google always failed, the Niang really do not give force. Most of the days have no clue.
Really two, then change the file name on the OK.
Linklist.c-->-changed to "LinkList.cpp"
MAIN.C---> Changed to "main.cpp"
Compile through ~.
--------------------------------------------------------------------------------------------------------------- -----------------
It's not effective to refer to other people's methods. For example, these few:
Method one change project properties
Right Key Item "Properties"-"Configuration Properties"-"linker"-"System" change "subsystem" to "Windows (/subsys:windows)"
Method two adds the statement #pragma comment (lib, "Ws2_32.lib") to the header file to explicitly load.
That
#include <winsock2.h>
#pragma comment (lib, "Ws2_32")
--------------------------------------------------------------------------------------------------------------- -----------------