apple mach-o linker error linker command failed with exit code 1 (use -v to see invocation)

10,731

Solution 1

You need open detail description.

step image

Solution 2

Check if you have imported a .m file instead if .h somewhere in your project.

Another thing to look for is the import of a header file twice.

If the above two don't work Select your project -> Build Phases -> Link Binary with Libraries. Go through the list and see if a framework is added more than once.

Share:
10,731
Marking
Author by

Marking

Updated on June 05, 2022

Comments

  • Marking
    Marking almost 2 years

    enter image description here

    2I am working with Objective C with core data, I got an error:

    Apple Mach-O Linker Error, Linker command failed with exit code 1 (use -v to see invocation)enter image description here

  • Tejas K
    Tejas K almost 7 years
    Did you check it ? Give it a try.
  • young
    young almost 7 years
    you need check somewhere have duplicate file.
  • Ravi
    Ravi almost 7 years
    In my case there are duplicate files. Thanks
  • jmknoll
    jmknoll almost 7 years
    If you're using react-native and seeing duplicate symbols, you may have added a library twice, once manually and once with the react-native link command.
  • Tejas K
    Tejas K almost 7 years
    @GvSharma: Which option?
  • Tejas K
    Tejas K almost 7 years
    @GvSharma:Sorry, It's in project -> Build Phases -> Link Binary with Libraries