开发者

how to create a dll of my c++ code. [duplicate]

This question already has an answer here: Closed 11 years ago.

Possible Duplicate:

how dll created out of c++ source and how it is used in other sources?

I need to call a c++ code, which get the开发者_运维百科 PID/VID of the external device in my java code. I googled and some info. By converting the c++ code to a dll, I can use it in my java code. Any suggestion to how to convert my c++ code to a dll file.


What you are looking for is JNI (Java Native Interface).

Here is a link for compiling a dll using VC++ - http://www.tidytutorials.com/2009/07/java-native-interface-jni-example-using.html

and one using MinGW - http://www.mingw.org/node/41


Find step by step process to make dll with VC++ here.

Also you need to use JNI for using c++ dll into your java project.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜