JavaCPP
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了JavaCPP,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含2444字,纯文字阅读大概需要4分钟。
内容图文
![JavaCPP](/upload/InfoBanner/zyjiaocheng/1095/a03b0c4468a84eb7ae6118da80a70502.jpg)
https://github.com/bytedeco/javacpp#introduction
https://github.com/bytedeco/javacpp-presets
——————————————————————————————————————————————————————————————————————————————————
Introduction
JavaCPP provides efficient access to native C++ inside Java, not unlike the way some C/C++ compilers interact with assembly language. No need to invent new languages such as with SWIG, SIP, C++/CLI, Cython, or RPython as required by cppyy. Instead, it exploits the syntactic and semantic similarities between Java and C++. Under the hood, it uses JNI, so it works with all implementations of Java SE, in addition to Android, Avian, and RoboVM (instructions).
More specifically, when compared to the approaches above or elsewhere (CableSwig, JNIGeneratorApp, cxxwrap, JNIWrapper, Platform Invoke, GlueGen, LWJGL Generator, JNIDirect, ctypes, JNA, JNIEasy, JniMarshall, JNative, J/Invoke, HawtJNI, JNR, BridJ, fficxx, CppSharp, cgo, rust-bindgen, etc.), it maps naturally and efficiently many common features afforded by the C++ language and often considered problematic, including overloaded operators, class and function templates, callbacks through function pointers, function objects (aka functors), virtual functions and member function pointers, nested struct definitions, variable length arguments, nested namespaces, large data structures containing arbitrary cycles, virtual and multiple inheritance, passing/returning by value/reference/string/vector, anonymous unions, bit fields, exceptions, destructors and shared or unique pointers (via either try-with-resources or garbage collection), and documentation comments. Obviously, neatly supporting the whole of C++ would require more work (although one could argue about the intrinsic neatness of C++), but we are releasing it here as a proof of concept.
As a case in point, we have already used it to produce complete interfaces to OpenCV, FFmpeg, libdc1394, PGR FlyCapture, OpenKinect, videoInput, ARToolKitPlus, and others as part of the JavaCPP Presets subproject, also demonstrating early parsing capabilities of C/C++ header files that show promising and useful results.
Please feel free to ask questions on the mailing list if you encounter any problems with the software! I am sure it is far from perfect...
Downloads
- JavaCPP 1.4 binary archive javacpp-1.4-bin.zip (348 KB)
- JavaCPP 1.4 source archive javacpp-1.4-src.zip (319 KB)
原文:https://www.cnblogs.com/cuizhenfu/p/8644192.html
内容总结
以上是互联网集市为您收集整理的JavaCPP全部内容,希望文章能够帮你解决JavaCPP所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。