-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behavior
Description
Zig Version
0.12.0
Steps to Reproduce and Observed Behavior
if in build.zig you define something like exe.defineCMacro("NOCPP", "1");and the header file the youcImport` has something like
#ifndef NOCPP
namespace nsfoo {
struct CppFoo{};
}
#endif
the compilation will fail. However, if before the cImport you use @cDefine("NOCPP", "1");, it works
Expected Behavior
I'd expect the defineCMacro to be respected
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behavior