iActiveRecord icon indicating copy to clipboard operation
iActiveRecord copied to clipboard

errors building on XCode 5.1

Open gsoro opened this issue 12 years ago • 9 comments

Hi, i'm having a series of issues (see image attached) trying to build the framework on XCode 5.1. Have you managed to build for ios7/code 5 or is it still on the run?

Thanx G. schermata 2013-10-31 alle 13 46 06

gsoro avatar Oct 31 '13 12:10 gsoro

I will check this asap, thank you.

AlexDenisov avatar Oct 31 '13 13:10 AlexDenisov

Hi,

i ran into the same problem with XCode 5 and MacOS Maverick 10.9.

I solved it by adding the Foundation framework as target link dependency of the ActiveRecord lib project and add the follwoing includes to IColumnInternat.h

#include <cstring>
#include <memory>
#import <Foundation/NSString.h>

Since i don't know wether it makes sense to add the framework to a static lib, i did not create a pull request.

jklimke avatar Nov 07 '13 15:11 jklimke

Hmm, i hope to have this one fixed, but unfortunately a linking problem appeared saying:

Undefined symbols for architecture i386: "vtable for AR::NSNumberColumn", referenced from: AR::NSNumberColumn::NSNumberColumn() in ActiveRecord NOTE: a missing vtable usually means the first non-inline virtual member function has no definition. ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)

i double checked the virtual methods of AR::NSNumberColumn are implemented within the iActiveRecord source. Any ideas what could possibly the reason for this ?

jklimke avatar Nov 07 '13 17:11 jklimke

Hello, guys. I've added small fix, and now it works on my machine as well. Could you check is this issue still exists?

AlexDenisov avatar Nov 10 '13 16:11 AlexDenisov

Hi, i tested it with building my own application and integrating the generated framework (not via podfile). It turns out that nothing changed for me. I still get the error above when i try to link my project.

In contrast, you active twitter example compiles and works well.

jklimke avatar Nov 10 '13 17:11 jklimke

It's quite strange. btw, ActiveTwitter uses CocoaPods...

AlexDenisov avatar Nov 10 '13 17:11 AlexDenisov

Yeah, i noticed that an tried to use the podfile that is included within the project. At least this compiling now.

Now i got another issue. This could originate from my code.

that is the runtime exception i get:

exception 'NSInvalidArgumentException', reason: '-[Topic setDescription:]: unrecognized selector sent to instance 0xa124b10'

Topic is defined as

#import <ActiveRecord/ActiveRecord.h>

@class Contact;
@class ContactGroup;

@interface Topic : ActiveRecord

@property NSString* title;
@property NSString* description;


has_many_through_dec(Contact, ContactGroup, contactGroups, ARDependencyNullify)

@end

and implemented like this:

@implementation Topic


@dynamic description;
@dynamic title;

has_many_through_imp(Contact, ContactGroup, contactGroups, ARDependencyDestroy)

@end

is there maybe any kind of initialization i have to run on application startup ? or is this done automagically ?

jklimke avatar Nov 10 '13 17:11 jklimke

Yep, you should add initialization somewhere (applicationDidFinishLaunching the best point), just review the ActiveTwitter target.

AlexDenisov avatar Nov 10 '13 17:11 AlexDenisov

This, in connection with the usage of the podspec file seems to work. Thanks a lot for your help.

jklimke avatar Nov 10 '13 18:11 jklimke