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

"struct spv_context_t" misses a typedef for C compilation #138

Closed
yoanlcq opened this issue Mar 1, 2016 · 2 comments
Closed

"struct spv_context_t" misses a typedef for C compilation #138

yoanlcq opened this issue Mar 1, 2016 · 2 comments

Comments

@yoanlcq
Copy link

yoanlcq commented Mar 1, 2016

Including libspirv.h in a C project causes an error at this line :
https://github.com/KhronosGroup/SPIRV-Tools/blob/master/include/spirv-tools/libspirv.h#L344
because spv_context_t isn't a known type, but struct spv_context_t is.

Since libspirv is intended as a C API, this should be fixed by adding
typedef struct spv_context_t spv_context_t; just here :
https://github.com/KhronosGroup/SPIRV-Tools/blob/master/include/spirv-tools/libspirv.h#L334

@dekimir
Copy link

dekimir commented Mar 1, 2016

Will fix, but libspirv.h is currently far from being C friendly. It has several other non-C constructs, such as bool and namespace in OpenCL.std.h.

@dekimir
Copy link

dekimir commented Mar 1, 2016

Fixed via c31a319.

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

2 participants