如何在C ++中添加库? [英] How to add a library in C++?
问题描述
Iam新到C ++,我试图使用VS 2013添加NLopt库到C ++。NLopt是一个非线性优化库( http://ab-initio.mit.edu/wiki/index.php/NLopt_C-plus-plus_Reference#Compiling_and_linking_your_program_to_NLopt )。 NLopt有一个DLL文件和.h文件,我不能找出一种方法来让他们工作。
Iam new to C++ and I am trying to add NLopt library to C++ using VS 2013. NLopt is a non-linear optimization library (http://ab-initio.mit.edu/wiki/index.php/NLopt_C-plus-plus_Reference#Compiling_and_linking_your_program_to_NLopt). NLopt has a DLL file and .h file and I cannot figure out a way to get them work. I appreciate if anyone can give me a quick guide on how to import this library.
提前感谢。
推荐答案
这里是你想要经历的:Visual C ++中的DLL - http://msdn.microsoft.com/en-us/library/1ez7dh12.aspx
Here's what you'd want to go through: DLLs in Visual C++ - http://msdn.microsoft.com/en-us/library/1ez7dh12.aspx
更具体地说,测量从您的问题,您可能正在寻找隐式链接 - http://msdn.microsoft。 com / en-us / library / d14wsce5.aspx
More specifically, gauging from your question you are probably looking for Implicit Linking - http://msdn.microsoft.com/en-us/library/d14wsce5.aspx
如果所有这些都令你困惑,可以先通过这个步骤: http://msdn.microsoft.com/en-us/library/vstudio /ms235636.aspx
And if all of that sounds confusing to you, you might go through this walk-through first: http://msdn.microsoft.com/en-us/library/vstudio/ms235636.aspx
这篇关于如何在C ++中添加库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!