Skip to content

How to use native C/C++ code with Kha? #1258

Answered by RobDangerous
Sanva asked this question in Q&A
Discussion options

You must be logged in to vote

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.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by RobDangerous
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants