Help with Page 196, school project please help


#1

Hello,
Yesterday I started chapter 9 from scratch and when I would get to the bottomof page 200 the ph that says “build and run the application now…” I got an error after hours of frustration I decided to start over a second time from scratch thinking maybe I missed something. I got the same reuslts, I decided to give it a third shot hoping for the best, except this time I would build the application after every step and found that the issue I was having happens right after I implement adding the lines right on top of page 196. After I put those lines in an hit build, I get the error. Then I thought well maybe I have to finish up the rest of the chapter and eventually I will input the missing information causing the errors, well I got to the bottom of page 200 where I should be able to sucessfully run the build, and it is not working. Can anyone please instruct me on what I need to do, I will post on here information that I think may help, ask for whatever else you may need. My deadline is coming close!
Since I did not know how to upload the pictures to this board, i uploaded them to a public folder on my skydrive, you can find them here.
I will really appreciate any help anyone could provide.
http://sdrv.ms/11lwWah


#2

You should post your files here, between the Code tags, in order to make it easier for others to read.
Ditto for the error messages you are getting.


#3

[quote]Ld /Users/Plastik/Library/Developer/Xcode/DerivedData/Homepwner-amvwxdgotfslkwboseuvehpuxyic/Build/Products/Debug-iphonesimulator/Homepwner.app/Homepwner normal i386
cd /Users/Plastik/Desktop/Autoproof/Homepwner
setenv IPHONEOS_DEPLOYMENT_TARGET 6.1
setenv PATH “/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin”
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk -L/Users/Plastik/Library/Developer/Xcode/DerivedData/Homepwner-amvwxdgotfslkwboseuvehpuxyic/Build/Products/Debug-iphonesimulator -F/Users/Plastik/Library/Developer/Xcode/DerivedData/Homepwner-amvwxdgotfslkwboseuvehpuxyic/Build/Products/Debug-iphonesimulator -filelist /Users/Plastik/Library/Developer/Xcode/DerivedData/Homepwner-amvwxdgotfslkwboseuvehpuxyic/Build/Intermediates/Homepwner.build/Debug-iphonesimulator/Homepwner.build/Objects-normal/i386/Homepwner.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=6.1 -framework UIKit -framework Foundation -framework CoreGraphics -o /Users/Plastik/Library/Developer/Xcode/DerivedData/Homepwner-amvwxdgotfslkwboseuvehpuxyic/Build/Products/Debug-iphonesimulator/Homepwner.app/Homepwner

Undefined symbols for architecture i386:
"OBJC_CLASS_BNRItem", referenced from: objc-class-ref in BNRItemStore.o (maybe you meant: _OBJC_CLASS__BNRItemStore)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
[/quote]

[quote] "OBJC_CLASS_BNRItem", referenced from: objc-class-ref in BNRItemStore.o (maybe you meant: _OBJC_CLASS__BNRItemStore)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)[/quote]


#4

Looks like you copied the BNRItem.(hm) to your project but didn’t specify that they were part of the target. Easy to do and for some reason is not the default when copying files into your project. During the copy, once you tell Xcode to “Add to Target” it seems to be more sticky but in some cases I still have to check the box when copying code from one project to another.

In Xcode, click on BNRItem.m on the left column, the navigator area.
Look on the far right side column
Make sure you select the “page like” icon at the top of the right side column, if you mouse over the icon it will say "Show the File Inspector"
In the middle/center of the right side column (file inspector) is a section called, "Target Membership"
make sure the little check box is checked.

If it’s already checked… then ?? I’m not sure what the issue is.

Hope this helps


#5

[quote=“hbdesiato”]Looks like you copied the BNRItem.(hm) to your project but didn’t specify that they were part of the target. Easy to do and for some reason is not the default when copying files into your project. During the copy, once you tell Xcode to “Add to Target” it seems to be more sticky but in some cases I still have to check the box when copying code from one project to another.

In Xcode, click on BNRItem.m on the left column, the navigator area.
Look on the far right side column
Make sure you select the “page like” icon at the top of the right side column, if you mouse over the icon it will say "Show the File Inspector"
In the middle/center of the right side column (file inspector) is a section called, "Target Membership"
make sure the little check box is checked.

If it’s already checked… then ?? I’m not sure what the issue is.

Hope this helps[/quote]

Even when you check the copy box, when dragging and dropping - you still get the error.
One way to fix it would be to add the file manually via compile sources.