Skip to content

ogt_vox, ogt_voxel_meshify: wrap API in extern "C" block#77

Open
zeozeozeo wants to merge 2 commits intojpaver:masterfrom
zeozeozeo:extern-c
Open

ogt_vox, ogt_voxel_meshify: wrap API in extern "C" block#77
zeozeozeo wants to merge 2 commits intojpaver:masterfrom
zeozeozeo:extern-c

Conversation

@zeozeozeo
Copy link
Copy Markdown

@zeozeozeo zeozeozeo commented Jul 16, 2025

Wrap the API of ogt_vox and ogt_voxel_meshify into an extern "C" block.

This is to prevent the C++ compiler from mangling the function names in the library, making it trivial to make bindings for opengametools in other languages (for example, Odin bindings by me: https://github.com/zeozeozeo/odin-opengametools).

@mgerhardy
Copy link
Copy Markdown
Collaborator

#ifndef OGT_VOX_API
#define OGT_VOX_API
#endif

and then adding OGT_VOX_API to each function that is exposed would be the better way imo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants