Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

duplicate symbol BTError* #106

Closed
RolandasRazma opened this issue Mar 14, 2015 · 6 comments
Closed

duplicate symbol BTError* #106

RolandasRazma opened this issue Mar 14, 2015 · 6 comments

Comments

@RolandasRazma
Copy link

I'm using cocoa pods to install braintree on empty project.
I do #import <Braintree/Braintree.h> in 2 files and I'm getting duplicate symbol errors for simulator but not for device.

duplicate symbol _BTErrorCode in:
    build/Objects-normal/x86_64/ViewController.o
    build/Objects-normal/x86_64/AppDelegate.o
duplicate symbol _BTAppSwitchErrorCode in:
    build/Objects-normal/x86_64/ViewController.o
    build/Objects-normal/x86_64/AppDelegate.o
duplicate symbol _BTPayPalErrorCode in:
    build/Objects-normal/x86_64/ViewController.o
    build/Objects-normal/x86_64/AppDelegate.o
duplicate symbol _BTPaymentProviderErrorCode in:
    build/Objects-normal/x86_64/ViewController.o
    build/Objects-normal/x86_64/AppDelegate.o

Am i missing something?

sample project:
https://www.dropbox.com/s/rzxbbv317yh3goy/braintree.zip

@SolomonBier
Copy link

@RolandasRazma can you try #import "Braintree.h" instead ?

@RolandasRazma
Copy link
Author

@SolomonBier same thing

@intelliot
Copy link
Contributor

Which versions of Xcode and CocoaPods are you using?

@intelliot
Copy link
Contributor

@RolandasRazma I investigated your sample project and found the problem:

GCC_NO_COMMON_BLOCKS = YES;

This line/setting in your xxx.xcodeproj file causes the error. If you remove it, the project compiles successfully. Did you set this flag intentionally?

@RolandasRazma
Copy link
Author

@intelliot good find. I didn't set it myself. Xcode 6.3 beta sets it by default to new projects.

@intelliot
Copy link
Contributor

We've fixed a bug in master so that you should be able to keep GCC_NO_COMMON_BLOCKS = YES; if you want.

Here's an example of using the master branch with your project:

pod 'Braintree', :git => '[email protected]:braintree/braintree_ios.git', :branch => 'master'

If you prefer, you can also specify a specific commit instead.

Thank you for letting us know about this issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants