在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:timholy/Cpp.jl开源软件地址:https://github.com/timholy/Cpp.jl开源编程语言:Julia 100.0%开源软件介绍:Cpp.jlSimple utilities for calling C++ from Julia See also CxxWrap, Clang, and Cxx. CxxWrap is the recommended solution for calling C++ and supersedes this package. OverviewJulia can call C code with no overhead, but it does not natively support C++. However, the C++ ABI is essentially "C plus some extra conventions," of which the most noteworthy is name mangling. Name mangling is used to support function overloading, a key C++ (and Julia) feature. Infamously, different compilers use different mangling conventions, and this has lead to more than a few headaches. However, in recent years there has been a greater push for standardization of the C++ ABI, and there is good documentation available on calling conventions of different compilers. This package provides utilities to call functions in C++ shared libraries as if
they were C. Currently it consists of a single macro, InstallationInstall from the Julia prompt via UsageAn example C++ shared library,
Within Julia, let's suppose you've defined the variable
The macro performs C++ ABI name-mangling, using the types of the parameters, to determine the correct library symbol. On a UNIX/gcc system, the first will generate a call to
Limitations/TODOLike
The latter three may not be difficult to fix. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论