[IOS development-19] When you encounter an Apple Mach-O Linker Error and a solution, adjust your open posture, mach-olinker

Source: Internet
Author: User

[IOS development-19] When you encounter an Apple Mach-O Linker Error and a solution, adjust your open posture, mach-olinker

(1) Situation

Close the xcode document, and then open xcode and select an existing project. If CMD + R fails, the system prompts "Apple Mach-O Linker Error.



(2) Solution

Click the error above and find a prompt saying, "SevenSwitch". This is the third-party class library we used to import from cococoapods and we performed the experiment on UISwitch, remember that after the import, the suffix of the file to be opened is. the xcworkspace file, not our previous one. xcodeproj file.


I guess the file we opened is incorrect. Go deep into the storage directory and open the. xcworkspace file directly:

A: Successful. CMD + R is normal.

B: The error occurs when the. xcodeproj file is opened.



(3) Adjust the "posture" you open

In fact, the two files above have the wrong one. the xcodeproj file is our earliest file, which is a blue file; open the correct one. the xcworkspace file is a file generated when we import a third-party class library. It is in a white color.


So let's take a look at the xcode startup interface below. We select the white hello project file on the right to open it correctly. Opening the blue hello project file will cause an error.



This may be a case where such an error occurs. Make a record and talk about it again. OVER.


I used box2d in the game. debug is okay, but apple mach-o linker error occurs in xcode release.

This is not a problem with box2d! Are you using external linked libraries or files to see if your debug and release settings are the same.
Hope to help you.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.