From 23481078699af9972b6d412f6e8b7619399d2813 Mon Sep 17 00:00:00 2001 From: Kamil Monicz Date: Sun, 22 Nov 2026 20:48:46 +0100 Subject: [PATCH] Fix compilation of the git hash example Terminate the forward declaration and separate the include flag literal from the macro name for C++ builds. --- how_to/020_bake_git_hash/nob.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/how_to/020_bake_git_hash/nob.c b/how_to/020_bake_git_hash/nob.c index e9b6ba3..d63052f 100644 --- a/how_to/020_bake_git_hash/nob.c +++ b/how_to/020_bake_git_hash/nob.c @@ -4,7 +4,7 @@ #define BUILD_FOLDER "build/" #define SRC_FOLDER "src/" -bool generate_build_h(void) +bool generate_build_h(void); int main(int argc, char **argv) { @@ -18,7 +18,7 @@ int main(int argc, char **argv) Cmd cmd = {0}; nob_cc(&cmd); nob_cc_flags(&cmd); - cmd_append(&cmd, "-I"BUILD_FOLDER); + cmd_append(&cmd, "-I" BUILD_FOLDER); nob_cc_output(&cmd, BUILD_FOLDER"main"); nob_cc_inputs(&cmd, SRC_FOLDER"main.c"); if (!cmd_run(&cmd)) return 1;