Coding Native Extensions

I am interested in getting started with native extensions for defold. I have read the manual page, but don’t understand how can I get auto completion in an external cpp editor. Wouldn’t I need the headers for the defold sdk?

I’ve made an unofficial stub implementation of the headers. It’s in a repo with one of my native extensions, you can also use it as a sample.

3 Likes

Thank you! This will certainly help me.

If you are using vscode, you can use this snippets. It contains all documented API.
But you have to update the package.json manually for cpp support. (maybe I should separate the cpp and lua files… good idea :slight_smile: ) if you need help on this just let me know.

1 Like

Thanks but for lua autocomplete I have setup IntelliJ with the defold api. And I’m actually gonna probably start using hxdefold to be able to use a strongly typed language.