在Visual Studio中如何将所有.lib包含在文件夹中
我正在尝试与另一个项目一起构建一个项目.那里有很多库,而且我不确定所需的未引用符号在哪里.
I am trying to build a project with another project. There are a lot of libs in there and I am not sure where the required unreferenced symbols are present.
有没有一种方法可以在编译时包含所有.lib
文件?
Is there a way I can include all the .lib
files while compiling?
我已经将lib
目录作为链接器的附加输入,但是它要求包含单个的.lib
文件.是否可以选择在此文件夹中包含所有.lib
?
I have given the lib
directory as an additional input to the linker, yet it asks for individual .lib
files to be included. Is there an option to say include all .lib
s in this folder?
bigD的答案是正确的.
bigD's answer is right.
至少在VS 2012中,您实际要执行此操作的位置是通过右键单击项目,然后转到:
The place you would actually do this, in VS 2012 at least, is by right-clicking on the project, then going:
属性>配置属性>链接器>命令行>其他选项
Properties > Configuration Properties > Linker > Command Line > Additional Options
在该框中,您只需输入:
In that box, you would just type:
"[libFolder]\*.lib"
您可以通过用空格分隔位置来获得多个位置,如下所示:
You can have multiple locations by separating locations with a space, like so:
"[libFolder1]\*.lib" "[libFolder2]\*.lib"