[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.