How to add a library in C++?

偶尔善良 提交于 2019-12-08 04:16:30

问题


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.

Thank you in advance.


回答1:


Here's what you'd want to go through: DLLs in Visual C++ - http://msdn.microsoft.com/en-us/library/1ez7dh12.aspx

More specifically, gauging from your question you are probably looking for Implicit Linking - http://msdn.microsoft.com/en-us/library/d14wsce5.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



来源:https://stackoverflow.com/questions/20105690/how-to-add-a-library-in-c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!