Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

To support file-local usage with 'static' (no 'extern') functions #255

Open
hu-xd opened this issue Sep 6, 2024 · 0 comments
Open

To support file-local usage with 'static' (no 'extern') functions #255

hu-xd opened this issue Sep 6, 2024 · 0 comments

Comments

@hu-xd
Copy link

hu-xd commented Sep 6, 2024

Please support single-file include mode without expose any 'extern' symbols to avoid conflicts in static-lib/wasm scenarios.

currently most of cgltf_* functions are declared using 'extern' which will expose the functions to other compilation units.
but in some scenarios like static-library or large webassembly/emscripten projects with many independently developed modules, this may introduce conflicts/duplicated symbols.

stb_ libraries uses a macro like STB_IMAGE_STATIC to switch between 'extern'/'static' functions, hopefully cgltf can support this too.
https://github.com/nothings/stb/blob/013ac3beddff3dbffafd5177e7972067cd2b5083/stb_image.h#L395C8-L395C24

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

No branches or pull requests

1 participant