duplicate symbol in Pods (Flipper) and external libraries

289 views Asked by At

I know there are tons of questions regarding this issue, but i didn't come up with solution. We have in my project (react-native) a static library: let's call it externalLib_v1.1r.a that we added manually to my project. It always worked fine. It's a security library and we have no access to the source code. With the new version of Flipper, that comes with latest versions of react-native, i have the following issue when building with Xcode:

duplicate symbol 'fileExists(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)' in:
    /Users/myuser/project/myproject/ios/externalLib_v1.1r.a(utility.o)
    /Users/myuser/Library/Developer/Xcode/DerivedData/proj-duwrxsmkbkccvdfykaajqslcqijq/Build/Products/Debug-iphonesimulator/Flipper/libFlipper.a(ConnectionContextStore.o)
ld: 1 duplicate symbol for architecture x86_64

There are 2 methods (1 inside externalLib_v1.1r.a and 1 inside ConnectionContextStore.cpp (Flipper)) with the same name.

If i manually rename the fileExists method inside the Flipper Pod it all works... Is there a way to avoid this workaround?

Note: I have the -ObjC flag in "Other Linker Flags" of my project.

0

There are 0 answers