#C Preprocessor broken in newer version

1 messages · Page 1 of 1 (latest)

indigo thunder
#

Hello, I have a build.zig for my C/C++ project that worked perfectly in the nightly 0.11.0 that I was using, but I tried upgrading to a nightly for 0.14.0 and I'm getting errors, specifically with my use of defineCMacro:

    const exe = b.addExecutable(.{
        .name = "chron4",
        .target = target,
        .optimize = optimize,
    });
    if(deploy){
        exe.defineCMacro("DEPLOY_BUILD", null);
    }

This line was to add a preprocessor macro for handling deploy features in the C and it worked just fine before but no longer, now I get

C:\dev\chron4\build.zig:39:12: error: no field or member function named 'defineCMacro' in 'Build.Step.Compile'

Is ther another way I can pass along this option to the binary?

sterile sapphire
indigo thunder
#

thank you, i was trying to track down when/if it was changed, is there any way I could have found that

#

not sure if theres someplace i wasnt looking

sterile sapphire
#

if you knew lots of stuff was being moved to root_module, you might have looked in there

#

also it was apparently deprecated in 0.13 but zig has no warnings so I had no idea like most people until it was gone