duplicate symbols for architecture armv7

前端 未结 16 1708
遥遥无期
遥遥无期 2020-12-01 01:46

Getting following error when try to use Layar SDK in my existing app. How can I solve this?

Ld /Users/pnawale/Library/Developer/Xcode/DerivedData/hub-afxxzaq         


        
16条回答
  •  一整个雨季
    2020-12-01 02:30

    I also had duplicate symbols. I just renamed the procedure (app -> app1, app2) and the associated fields app.XXX -> app1.XXX . and it worked !

    See : (in a .m file)

    AppDelegate* app1;
    
    - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
    {
        self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
        if (self) {
            // Custom initialization
            app1 = (AppDelegate *)[[UIApplication sharedApplication] delegate];
        }
        return self;
    }
    
    (...)
    
    - (int) getLimit
    {
        if (app1.product2buyed)
            return MAXID;
        else if (app1.product1buyed)
            return 70;
        else
            return 10;
    

提交回复
热议问题