Eclipse C++ dll 导入

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/492329/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 13:30:05  来源:igfitidea点击:

Eclipse C++ dll import

c++eclipsedllimport

提问by

How does one import a dll into an Eclipse C++ project?

如何将 dll 导入 Eclipse C++ 项目?

回答by Benjamin

You don't import the library files themselves since they are binary code and of little use. Usually you get a binary lib/dll with a bunch of header files. You include the header files in your program source, use the functions from the lib in your progam. Finally, in the project build settings you specify in the linker step that you also want to link with the binary lib/dll. The product will be an executable that uses the binary libs..

您不导入库文件本身,因为它们是二进制代码并且几乎没有用。通常你会得到一个带有一堆头文件的二进制 lib/dll。您在程序源中包含头文件,在程序中使用 lib 中的函数。最后,在您在链接器步骤中指定的项目构建设置中,您还希望与二进制 lib/dll 链接。该产品将是一个使用二进制库的可执行文件..

This is not unique to eclipse by the way :)

顺便说一下,这不是 eclipse 独有的:)

回答by Vinay

http://www.jinvoke.com/book/export/html/37- For using the dlls in Java under Eclipse

http://www.jinvoke.com/book/export/html/37- 用于在 Eclipse 下使用 Java 中的 dll