There are several ways to configure Lib by using visual Studio to write C + + programs, and here's how to load lib files in your code:
Create the folder in the directory under the project Lib, the Lib file under this path, including Debug and release two modes compiled lib file, in addition, according to the needs of the program, respectively, consider Win32 and x64 lib file.
The following preprocessing directives are used to load Lib files and automatically load the corresponding LIB according to the compilation environment.
#ifdef _DEBUG #pragma comment (lib, "Lib\\bulletcollision_debug.lib")#pragma comment (lib, "Lib\\bulletdynamics_ Debug.lib ")#pragma comment (lib," Lib\\linearmath_debug.lib ")#else#pragma comment (lib," Lib\\bulletcollision.lib ")#pragma comment (lib," Lib\\bulletdynamics.lib ")#pragma comment (lib," Lib\\linearmath.lib ")#endif
C + + program loading lib Static library