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
Jack Campbell
1,822 PointsCan Someone please help!
Ok, keep getting an Mach-O Linker Error. This is what the error says:
ld: building for iOS Simulator, but linking against dylib built for MacOSX file '/Applications/Xcode.app/Contents/Developer/Library/Frameworks/XCTest.framework/XCTest' for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)
Does anyone know what this means or how to fix it?
Thanks
Jack Campbell
1,822 PointsYeah.
1 Answer
Kai Aldag
Courses Plus Student 13,560 PointsHi, Jack
the error you're getting means that your file tree is missing a file and can't link all the file necessary to execute. Xcode should highlight the missing file in red. so to fix it simply find the missing file and re-add it.
if you need more info let me know or google it.
Best, Kai.
Jack Campbell
1,822 PointsThis is the only part that is highlighted. Do you know what I need to add?
linker command failed with exit code 1 (use -v to see invocation)
Kai Aldag
Courses Plus Student 13,560 PointsHmmm expand all your folders (and take a look at XCTests) to see if anything is red, if not can you show me the whole error message (including the part above the part that says "linker command failed with exit code 1 (use -v to see invocation)").
Jack Campbell
1,822 PointsThanks for your help.
ld: building for iOS Simulator, but linking against dylib built for MacOSX file '/Applications/Xcode.app/Contents/Developer/Library/Frameworks/XCTest.framework/XCTest' for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)
Kai Aldag
Courses Plus Student 13,560 PointsI'm not too sure but it looks like you're using a mac library in your iOS app (which is a problem), I think the file is at the link in the error (/Applications/Xcode.app/Contents/Developer/Library/Frameworks/XCTest.framework/XCTest) but I would definetly google "building for iOS Simulator, but linking against dylib built for MacOSX file "
Meek D
3,457 PointsMeek D
3,457 PointsAre you using the parse framework