Vlad Z
Vlad Z

Reputation: 385

XCode: linker command failed with exit code 1 (use -v to see invocation). How?

I am getting this error pretty often, but nevertheless - how do I use -v? Is there anything in the XCode GUI that lets me do it? Thanks.

Upvotes: 2

Views: 401

Answers (3)

oskarko
oskarko

Reputation: 4178

Sometimes linker command failed with exit code 1 means that you have something duplicate (a var, a class... with the same name) in somewhere.

Upvotes: 0

MarkMendy
MarkMendy

Reputation: 41

I don't know if this is directly related to your LINKER issue @vladz but I had a similar issue. I tried other approaches, none of which solved my problem with the "linker command failed with exist code 1 (use -v to see invocation)." message until I ran the pod install command. I don't know why I decided to do this (lucky guess on my part) but it did resolve my LINKER issue. I hope your issue has been resolved, and if not that this suggestion might help you out too. Cheers

Upvotes: 1

Aaron Golden
Aaron Golden

Reputation: 7102

I don't know of a way to do this within the Xcode GUI, but you can grab the command that produced the error and run it in the terminal, including the -v option there.

If you click on the little button that looks like a page of lines of text, on the far right in Xcode's build output window, beside the error in that window, a little area will expand showing the command that produced the error. It will be something (fairly long, probably) starting with Libtool. You can copy that whole command and add the -v option, like:

Libtool -v <whatever comes after>

Upvotes: 1

Related Questions