AlexDenisov / iActiveRecord

ActiveRecord for iOS without CoreData, only SQLite
http://alexdenisov.github.com/iActiveRecord/
MIT License
354 stars 50 forks source link

Problems on linking iActiveRecord to my App #35

Closed paulocoutinhox closed 11 years ago

paulocoutinhox commented 11 years ago

Hi,

I have downloaded the ZIP from github with source and i try install it to my project, but i get the error above:


Ld /Users/paulo/Library/Developer/Xcode/DerivedData/uBook-chcabrasmyhbfccdfgginmrzdgqw/Build/Products/Debug-iphonesimulator/uBook.app/uBook normal i386 cd /Users/paulo/Documents/workspaces/xcode/ubook setenv IPHONEOS_DEPLOYMENT_TARGET 5.0 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/paulo/Library/Developer/Xcode/DerivedData/uBook-chcabrasmyhbfccdfgginmrzdgqw/Build/Products/Debug-iphonesimulator -F/Users/paulo/Library/Developer/Xcode/DerivedData/uBook-chcabrasmyhbfccdfgginmrzdgqw/Build/Products/Debug-iphonesimulator -F/Users/paulo/Documents/workspaces/xcode/ubook/libs -filelist /Users/paulo/Library/Developer/Xcode/DerivedData/uBook-chcabrasmyhbfccdfgginmrzdgqw/Build/Intermediates/uBook.build/Debug-iphonesimulator/uBook.build/Objects-normal/i386/uBook.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=5.0 -framework ActiveRecord -lsqlite3 -framework AVFoundation -framework QuartzCore -framework UIKit -framework Foundation -framework CoreGraphics -o /Users/paulo/Library/Developer/Xcode/DerivedData/uBook-chcabrasmyhbfccdfgginmrzdgqw/Build/Products/Debug-iphonesimulator/uBook.app/uBook

Undefined symbols for architecture i386: "_OBJCCLASS$_ARConfiguration", referenced from: objc-class-ref in ActiveRecord ld: symbol(s) not found for architecture i386

clang: error: linker command failed with exit code 1 (use -v to see invocation)

The steps:

1 - Download zip from github 2 - Extract the zip 3 - Open the project into xcode (osx 10.8 and xcode 4.6.2) 4 - Build the project "Build_Framework" for iPhone Device 5 - Open Finder and go to extracted path (step #2) + "Products" 6 - Copy "ActiveRecord.framework" to my project path + "libs" (project/libs/ActiveRecord.framework) 7 - Open my project on xcode 8 - Add framework: my project path + "libs" (project/libs/ActiveRecord.framework) 9 - I already have sqlite3.dylib into my project and it is working, dont need add again 10 - Compile my project for iPhone Device 11 - Got the error ^^

:::SCREENSHOT:::

screen shot 2013-06-19 at 2 41 11 pm

paulocoutinhox commented 11 years ago

I forgot say that my project use ARC and DEPLOY TARGET is 5.0

AlexDenisov commented 11 years ago

Hi @prsolucoes, thank you for contributing. I've fixed this issue, now it should works fine. Note that some paragraphs on wiki is deprecated due to new AR features. You may look at ActiveTwitter target/sources for clarification.

If you still have problems (or they will be in the future) - please, feel free to open issue or ask me directly via email (or even skype).

paulocoutinhox commented 11 years ago

I build the ActiveRecord without the ARC, but on my project i use ARC, have any problems?

paulocoutinhox commented 11 years ago

With the current version of github the method on wiki:

[ActiveRecord registerDatabaseName:@"ubook" useDirectory:ARStorageDocuments];

Dont work. Whats the new version of it?

AlexDenisov commented 11 years ago
  1. ARC - if you use AR as a library, then you should not have any problems. Otherwise my understanding of ARC is totally wrong :smile:
  2. Here is the new API
AlexDenisov commented 11 years ago

Solved by #36