How to use native C/C++ code with Kha? #1258
-
Hi! I'm trying to advance in my understanding of Kha cross-platform build system, basically to answer the question How to use native C/C++ code with Kha in Android and Linux? I'm aware of the existence of
Anything that should be working nowadays? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi, I created a sample at https://github.com/Kha-Samples/NativeLibrary PS: Super thanks for copying your question to GitHub discussions. |
Beta Was this translation helpful? Give feedback.
Hi,
I created a sample at https://github.com/Kha-Samples/NativeLibrary
The basic procedure is to put a Kinc project with a kincfile somewhere, then add it via an addLibrary call in your khafile. Then you can use everything that hxcpp has to offer in terms of integrating Haxe with C/C++.
You can see how Kinc projects and kincfiles work at https://github.com/Kinc-Samples - it's very similar to Kha and its khafiles.
PS: Super thanks for copying your question to GitHub discussions.