Skip to content

Cannot compile as C library, has to be C++ #171

@httpdigest

Description

@httpdigest

There is a tiny inconvenience in OpenCL.std.h included by libspirv.h. That OpenCL header file is a C++ header file and so a client including libspirv.h cannot compile as C application, but must use a C++ compiler. (msvc complains when compiling a .c file including spirv-tools\libspirv.h)
Simply guarding the "namespace" directive with an #ifdef __cplusplus , or removing that namespace declaration, helped.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions