开发者

Automatic library selection

开发者 https://www.devze.com 2023-01-14 17:41 出处:网络
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.

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).

0

精彩评论

暂无评论...
验证码 换一张
取 消