Automatic library selection
I noticed that when linking 开发者_如何学Pythonboost libraries in VS2010, I only need to specify the linking directory, and the compiler automatically selects the right libary to link.
How can I do the same with my libraries?
Visual C/C++ has a #pragma that allows you to 'insert' linker options, e.g.
#pragma comment(linker,"/DEFAULTLIB:myveryownlibrary.lib")
See http://msdn.microsoft.com/en-us/library/7f0aews7%28v=vs.71%29.aspx for more information (look for /DEFAULTLIB).
精彩评论