(i) Production of. lib Files
(1) Open vs, select "New Project", select "Visual C + +" and select "Win32 Console Application".
(2) Click "OK", click "Next", set the following
(3) Click "Finish", then you can add. h and. cpp files to the project.
(4) After the code is written, right-click the project and tap the "Generate" button. Without errors, you can see the created. lib file in the Debug folder of the project.
(ii) using the. lib file
(1) Using LIB file requires two things, one is the header file added to the project, and the second is the generated. lib file.
(2) Configure project properties in projects that need to use LIB files, including "Include Directory", "Library Directory", and "Additional dependencies"
(3) "Include directory" is the path of the header file, "Library directory" is the path of the Lib file; "Additional Dependencies" is Xx.lib, which is the file name + suffix of the static connection library you generated.
Correct an error: In the Win32 Application Wizard, do not check the precompiled header option.
Making and using static link library (. lib) files