iOS Build Environment Help Center

unknown argument '-Wl'

Pierre-Marie Baty

Hello

Flags such as "-Wl,-Wsomething" that appear in the Xcode project settings are normally *compiler* flags instructing it to forward the "something" flag to the linker (more specifically, these flags are interpreted by the compiler driver and kept aside until the linker is called). This is a bad practice that your Xcode project passes them to the linker because these flags should be written in the format expected by the linker directly (e.g. "-l something"). Xcode tolerates this bogus syntax but the LLVM linker does not. Does your project build if you use the Apple linker instead ?

Append

(Leave this as-is, it’s a trap!)

Only the original author or a moderator can append to this post.

Pro tip: Use markup to add links, quotes and more.

Moderators: Pierre-Marie Baty