From a80a83c49f733b7c9102e192199cde6e65bea871 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 30 Mar 2025 13:40:04 -0400 Subject: [PATCH] Fix for including header files --- src/compile.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/compile.c b/src/compile.c index 73b24c2..aa4ddac 100644 --- a/src/compile.c +++ b/src/compile.c @@ -4407,10 +4407,12 @@ CORD compile_statement_type_header(env_t *env, ast_t *ast) return CORD_all("#include \"", Path$as_c_string(path), "\"\n"); } case USE_HEADER: - if (use->path[0] == '<') + if (use->path[0] == '<') { return CORD_all("#include ", use->path, "\n"); - else - return CORD_all("#include \"", use->path, "\"\n"); + } else { + Path_t path = Path$relative_to(Path$from_str(use->path), Path(".build")); + return CORD_all("#include \"", Path$as_c_string(path), "\"\n"); + } default: return CORD_EMPTY; }