VS2017 C ++ to create a dynamic library (DLL)

method one:

Create an empty c ++ dynamic library

(1) Create a Visual C ++ - "Empty Project

(2) modify the project properties

The configuration type to dynamic libraries (.dll), the target file extension to (.dll), Also note that the consistency of the platform 32, 64

(3) Add MyDLL.h files and file MyDLL.cpp

MyDLL.h file code is as follows:

MyDLL.h file code is as follows:

Second way:

(1) Visual C ++ - "Windows Desktop -" dynamic-link library (DLL)

(2) create .h header file

Here .cpp file has been created with the same name as the project file, you only need to create a header file.

C ++ DLL can create more than two ways

Guess you like

Origin blog.csdn.net/any1234567890/article/details/91491073