1. Use __declspec(dllexport) to export DLL
1. Modify the output configuration type to DLL
2. Add the function declaration in the header file
__declspec(dllexport) bool cmp(vector<Point> a, vector<Point> b);
Functions can be implemented in .h or .cpp files, depending on personal habits.
3. Right-click the project name and select Generate to generate the DLL
The generated DLL file can be found according to the path.
2. Use the def file to export the DLL
1. Right-click Add -> New Item -> Module Definition File (.def)
Pay attention to check whether the def file is associated with the current project
2. Write the functions to be exported in the file according to the following format
EXPORTS
cmp
3. Modify the output configuration type to DLL
4. Right-click the project name and select Generate to generate the DLL
The generated DLL file can be found according to the path.