From c99407b07a1ed5a09a518dca0690732287b6605f Mon Sep 17 00:00:00 2001 From: Neelesh Chandola Date: Sun, 16 Dec 2018 11:39:29 +0530 Subject: [PATCH 1/2] Add project directory to include path --- compiler/extccomp.nim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/extccomp.nim b/compiler/extccomp.nim index 23f723e29f..99e2534ec6 100644 --- a/compiler/extccomp.nim +++ b/compiler/extccomp.nim @@ -567,6 +567,8 @@ proc getCompileCFileCmd*(conf: ConfigRef; cfile: Cfile): string = includeCmd = "" compilePattern = getCompilerExe(conf, c, cfile.cname) + includeCmd.add(join([CC[c].includeCmd, conf.projectPath.string])) + var cf = if noAbsolutePaths(conf): AbsoluteFile extractFilename(cfile.cname.string) else: cfile.cname From e70c6af1882ad1a13567993a7a06b131fd6c9025 Mon Sep 17 00:00:00 2001 From: Neelesh Chandola Date: Sun, 16 Dec 2018 14:42:57 +0530 Subject: [PATCH 2/2] escape the include path --- compiler/extccomp.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/extccomp.nim b/compiler/extccomp.nim index 99e2534ec6..69705db43c 100644 --- a/compiler/extccomp.nim +++ b/compiler/extccomp.nim @@ -567,7 +567,7 @@ proc getCompileCFileCmd*(conf: ConfigRef; cfile: Cfile): string = includeCmd = "" compilePattern = getCompilerExe(conf, c, cfile.cname) - includeCmd.add(join([CC[c].includeCmd, conf.projectPath.string])) + includeCmd.add(join([CC[c].includeCmd, quoteShell(conf.projectPath.string)])) var cf = if noAbsolutePaths(conf): AbsoluteFile extractFilename(cfile.cname.string) else: cfile.cname