diff --git a/compiler/extccomp.nim b/compiler/extccomp.nim index 26f0318ee2..7d777b0e3d 100644 --- a/compiler/extccomp.nim +++ b/compiler/extccomp.nim @@ -668,7 +668,8 @@ proc callCCompiler*(projectfile: string) = it = PStrEntry(it.next) if optGenStaticLib in gGlobalOptions: - linkCmd = CC[c].buildLib % ["libfile", (libNameTmpl() % gProjectName), + let (_, name, _) = splitFile(gProjectName) + linkCmd = CC[c].buildLib % ["libfile", (libNameTmpl() % name), "objfiles", objfiles] else: var linkerExe = getConfigVar(c, ".linkerexe")