# Calling c function from Hashlink (bytecode mode)

**URL:** <https://community.haxe.org/t/calling-c-function-from-hashlink-bytecode-mode/2636>\
**Category:** Haxe\
**Created:** [August 29, 2020, 10:16pm UTC](https://community.haxe.org/t/calling-c-function-from-hashlink-bytecode-mode/2636 "2020-08-29T22:16:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![the-oaks](https://avatars.discourse-cdn.com/v2/letter/t/85f322/32.png) [@the-oaks](https://community.haxe.org/u/the-oaks)\
**Post date:** [August 29, 2020, 10:16pm UTC](https://community.haxe.org/t/calling-c-function-from-hashlink-bytecode-mode/2636/1 "2020-08-29T22:16:36Z")

</div>

Look like we have a fairly straightforward way to call an external c function (from a shared object) with hxcpp or neko target ([C Foreign Function Interface - Haxe](http://old.haxe.org/doc/cpp/ffi)), may I ask how to do the same for HL (bytecode mode)? thank you very much in advance!

---

<div class="post-metadata">

**Author:** ![Apprentice-Alchemist](https://community.haxe.org/user_avatar/community.haxe.org/apprentice-alchemist/32/1324_2.png) [@Apprentice-Alchemist](https://community.haxe.org/u/Apprentice-Alchemist)\
**Post date:** [August 30, 2020, 8:05am UTC](https://community.haxe.org/t/calling-c-function-from-hashlink-bytecode-mode/2636/2 "2020-08-30T08:05:46Z")

</div>

> **[HaxeFoundation/hashlink](https://github.com/HaxeFoundation/hashlink/wiki/HashLink-native-extension-tutorial)**
>
> HashLink-native-extension-tutorial

---

<div class="post-metadata">

**Author:** ![the-oaks](https://avatars.discourse-cdn.com/v2/letter/t/85f322/32.png) [@the-oaks](https://community.haxe.org/u/the-oaks)\
**Post date:** [August 30, 2020, 4:18pm UTC](https://community.haxe.org/t/calling-c-function-from-hashlink-bytecode-mode/2636/3 "2020-08-30T16:18:19Z")

</div>

thank you very much for the pointer! It is not as straightforward as I hoped for but it is definitely positive that it is doable and the overhead is I think managable! thank you again!

---

<div class="post-metadata">

**Author:** ![josuigoa](https://community.haxe.org/user_avatar/community.haxe.org/josuigoa/32/611_2.png) [@josuigoa](https://community.haxe.org/u/josuigoa)\
**Post date:** [August 31, 2020, 7:16am UTC](https://community.haxe.org/t/calling-c-function-from-hashlink-bytecode-mode/2636/4 "2020-08-31T07:16:10Z")

</div>

I’d created a while ago a little project, I think is what you want: [GitHub - josuigoa/hl-extension](https://github.com/josuigoa/hl-extension)
