Give different names to objects coming from cpp files (#8278)
Prevent some nasty linker errors if the user switches between c and cpp backends.
This commit is contained in:
parent
40f44a0c16
commit
54a85b4ff5
1 changed files with 1 additions and 4 deletions
|
|
@ -434,10 +434,7 @@ proc completeCFilePath*(conf: ConfigRef; cfile: string, createSubDir: bool = tru
|
||||||
|
|
||||||
proc toObjFile*(conf: ConfigRef; filename: string): string =
|
proc toObjFile*(conf: ConfigRef; filename: string): string =
|
||||||
# Object file for compilation
|
# Object file for compilation
|
||||||
#if filename.endsWith(".cpp"):
|
result = filename & "." & CC[conf.cCompiler].objExt
|
||||||
# result = changeFileExt(filename, "cpp." & CC[cCompiler].objExt)
|
|
||||||
#else:
|
|
||||||
result = changeFileExt(filename, CC[conf.cCompiler].objExt)
|
|
||||||
|
|
||||||
proc addFileToCompile*(conf: ConfigRef; cf: Cfile) =
|
proc addFileToCompile*(conf: ConfigRef; cf: Cfile) =
|
||||||
conf.toCompile.add(cf)
|
conf.toCompile.add(cf)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue