What does #pragma comment(lib, “XXX”) actually do with “XXX”?
That pragma is used to link against the specified .lib file. This is an alternative to specifying the library in the external dependencies field in project settings. Mostly, it’s used to support different versions: #ifdef USE_FIRST_VERSION #pragma comment(lib, “vers1.lib”) #else #pragma comment(lib, “vers2.lib”) #endif When your application uses a dynamically-linked library, a lib file tells … Read more