使用VS2019,大概步骤
-
Create a DLL project in Visual Studio.
-
Add exported functions and variables to the DLL.
-
Create a console app project in Visual Studio.
-
Use the functions and variables imported from the DLL in the console app.
-
Run the completed app.
参考:
Walkthrough: Create and use your own Dynamic Link Library (C++) | Microsoft Docs