c3lang / c3c

Compiler for the C3 language
https://c3-lang.org
GNU Lesser General Public License v3.0
3.03k stars 183 forks source link

linker errors if multiple C files have same name #1592

Open Waqar144 opened 1 month ago

Waqar144 commented 1 month ago

when using c sources mixed with c3 sources, if there are two C files in different directories with same name then it results in linker errors

lerno commented 1 month ago

Yes, that's probably rather inevitable using the current scheme where all .o files are placed in the same directory. Possibly we could rename them?

Waqar144 commented 1 month ago

Yes, that'd be good. I'd suggest just suffixing a number for the duplicates. The compiler can print note to stderr about the duplication and the new name.