Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS

Need help on fixing Xcode error.

So I really need help on this Xcode error that i don’t even know what it is and also is preventing me from using the simulator. the error says this “Apple Mach-O Linker Error Linker command failed with exit code 1(use -v to see invocation) “

Can you please help me fix this error please and thank you.

10 Answers

Just rerun the program. I had similar problems.

What you mean by that?

Like force quit Xcode and run it again?

No, sorry. I mean stop the app you are running in Xcode and run it again. Keyboard shortcut is "Command" + "." and then "Command" + "R". The situation you are facing sometimes start when you start the iOS simulator for the first time after your computer has booted.

It's saying build failed.

It might be your code problem, so you might want to check on that. If there is no problem in your code, then I have no idea why it cannot run.

Well the error has a red octagon with a white exclamation mark in the middle.

Then it is your code error, if it is an octagon, then you can click on the error and see what the error is. And then fix it.

So i think that its just an error within my code but I try looking for it and I can't find no error.

Well I have tried but I can't seem to fix it.

Can you tell me what's the code you have at that line, maybe I can help you fixing it.

Well idk which code is the one causing the error but when i click on the error this is what it says "linker command failed with exit code 1 (use -v to see invocation)"

Is the error displayed in the console or beside your code or only on the bar on the top

The error is displayed on the top and also the section where you are able to see all errors within your whole project.

I think it's call the issue navigator.

Are you using OS X El Capitan beta or are you using a not up-to-date Xcode?

Well it's Xcode version 6.4.

Hey Ricardo - upload your xcode project files and we'll take a look.

The 'red error octagon' that you described will DEFINITELY prevent you from building your project. The red error means there's some roadblock error that must be fixed before your program can be compiled.

Look through your code - xcode highlights errors.