Linking files - inline, or Dev studio?
-
Is it better to link .lib files using a line such as: #pragma comment(lib,"XXXXXX.lib") or, should they be linked via the project settings? What are the practical differences to these approaches? Thanks, -mutty
they're easier to find, if you put them in the project settings. Cleek | Image Toolkits | Thumbnail maker
-
Is it better to link .lib files using a line such as: #pragma comment(lib,"XXXXXX.lib") or, should they be linked via the project settings? What are the practical differences to these approaches? Thanks, -mutty
I think there is no difference regarding the final executable, but I think putting of
#pragma comment(lib,"XXXXXX.lib")
in your files at least requires less configuration work when you re-use your code in other applications. You will not need to remember each time which external libraries must be used. For instance, this practice can be seen in the header files supplied with MFC.