# Best way to create a julia function wrapper of a cpp function

**URL:** <https://discourse.julialang.org/t/best-way-to-create-a-julia-function-wrapper-of-a-cpp-function/25915>\
**Category:** General Usage\
**Tags:** cxx, cxxwrap\
**Created:** [July 2, 2019, 8:47am UTC](https://discourse.julialang.org/t/best-way-to-create-a-julia-function-wrapper-of-a-cpp-function/25915 "2019-07-02T08:47:17Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![oheil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oheil/32/220745_2.png) [@oheil](https://discourse.julialang.org/u/oheil)\
**Post date:** [July 2, 2019, 8:51am UTC](https://discourse.julialang.org/t/best-way-to-create-a-julia-function-wrapper-of-a-cpp-function/25915/2 "2019-07-02T08:51:52Z")

</div>

Is there a difference between calling a function written in C++ or in C?  
If not somebody posted this yesterday:

> [@CBinding.jl - bringing C's nested structs/unions, alignment, bitfields, variadic functions to Julia](https://discourse.julialang.org/t/cbinding-jl-bringing-cs-nested-structs-unions-alignment-bitfields-variadic-functions-to-julia/25902):
>
> I am announcing the availability of package [CBinding.jl](https://github.com/analytech-solutions/CBinding.jl) as a much improved way of interfacing C APIs from Julia with syntax analogous to the C you are binding to! julia\> using CBinding julia\> @cstruct MyCStruct { # struct MyCStruct { c::Cchar # char c; i::Cint # int i; @cunion { # union { f::Cfloat # float f; d::Cdouble # double d; } …

---

_[View the full topic](https://discourse.julialang.org/t/best-way-to-create-a-julia-function-wrapper-of-a-cpp-function/25915)._
