Microsoft Visual Studio 2010在此版本中添加.lib文件 [英] Microsoft Visual Studio 2010 adding .lib files in this version
问题描述
我刚刚下载了Visual Studio 2010,并且他们从Visual Studio 2008以来改变了很多,并且这些选项改变了,标题包括,lib目录添加,所有改变,我按照一系列教程来做,但是另一个版本我只是在文本字段中添加了mylib.lib字符串,但现在我查看一遍,我找不到一个地方粘贴mylib.lib链接到我的项目。
I just downloaded the Visual Studio 2010 and they changed a lot since the Visual Studio 2008, and these options were changed, the header includes, the lib directory to add, all changed, I followed a series of tutorials to do that, but the other version I just had to add the mylib.lib string in the textfield, but Now I look over and over and I can't find a place to paste that mylib.lib to link with my project.
有人可以详细解释我在哪里可以找到它?
Someone can explain detailed where can I find it?
提前感谢。
推荐答案
如果你正在寻找如何获取一个lib文件导入到你的项目,你可以通过编辑在链接器>输入下的项目设置:
If you're looking for how to get a lib file imported in to your project, you can do this either by editing the project settings, under Linker>Input:
...或者您可以使用 #pragma
...
...or you can use a #pragma
...
#pragma comment( lib, "MyLib.lib" )
我通常将此权限添加到要导入的库的头文件中。或者,您可以将其添加到项目中的任何标题或CPP文件。
I typically add this right in to the header file for the library I want to import. Alternatively, you can add it to any header or CPP file in your project.
这篇关于Microsoft Visual Studio 2010在此版本中添加.lib文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!