#Linker flag problem using Zig as C compiler for cross-platform

1 messages · Page 1 of 1 (latest)

bitter gorge
#

I was trying to compile/link a project using zig cc and I ran into a linker error:
error: unsupported linker arg: --allow-multiple-definition

GCC/musl/BusyBox under Alpine works fine for the same project.

Is this something deserving an issue? I saw on GitHub Zig is opinionated about linker flags. Is this true? Is Zig only was meant as a drop in replacement compiler or linker as well? I tried both 0.12 and 0.13.

vivid zinc
#

I don’t know if ld supports multiple definitions, you can just zig to compile the object files but you probably need to use another linker