small medium large xlarge

12 Aug 2010, 01:57
Dan Chilton (2 posts)

This is from the P1.0 printing, page 13.

After following instructions and clicking on “Build and Run” to see a simple window of my first application, I get the following error:

Build TextApp of project TextApp with configuration Debug

Ld build/Debug/ normal x86_64
cd "/Users/****/Desktop/TextApp"
/Developer/usr/bin/gcc-4.2 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -L/Users/****/Desktop/TextApp/build/Debug -F/Users/****/Desktop/TextApp/build/Debug -filelist /Users/****/Desktop/TextApp/build/ -mmacosx-version-min=10.6 -framework Cocoa -o /Users/****/Desktop/TextApp/build/Debug/

ld: file not found: /Users/****/Desktop/TextApp/build/ /Users/****/Desktop/TextApp/build/
collect2: ld returned 1 exit status
Command /Developer/usr/bin/gcc-4.2 failed with exit code 1

My computer name has been replaced with **.

Any ideas? Kind of frustrated to hit an error right out of the gate.

Using Xcode 3.2.3 on OSX 10.6.4

12 Aug 2010, 03:08
Dan Chilton (2 posts)

I actually solved this one myself. My user directory has an apostrophe in it, which was causing the error above. After changing my account’s short name, I was able to continue with the instruction.

12 Aug 2010, 10:07
Tim Isted (105 posts)

Sorry that you ran into a snag so early on, I realize how frustrating that is. I have to say that I’m really glad you figured this out so quickly as I’m not entirely sure I would jumped straight to that conclusion!

If having an apostrophe in your account’s short name is important to you, I believe that there could be another way around this problem. Xcode can make use of different compilers to compile and build your project. The error messages above are related to the linker used by the GCC compiler (called ld). It’s possible that compiling with the alternative, LLVM, would be fine. Let me know if you’d like to know how to change to the LLVM compiler; it’s a simple Build Settings change.

I haven’t been able to test this, though. Interestingly, when I tried to create a user account with an apostrophe in the name (using the Accounts pane in System Preferences rather than the command line), the short account name automatically removed the apostrophe, and I was unable to add it back in.

You must be logged in to comment