Xcode project link error with ObjC flag

After added -ObjC to other linker flags, got duplicate symbol for architecture link error duplicate symbol _main in: /Users/imac/Library/Developer/Xcode/DerivedData/FuseProject-ddeguelbqiixlpaechaamdwdhefk/Build/Intermediates/FuseProject.build/Release-iphonesimulator/FuseProject.build/Objects-normal/x86_64/Main.o /usr/local/share/uno/Packages/UnoCore/0.19.6/Targets/CPlusPlus/Prebuilt/iOS/lib/Release-iphonesimulator/libXliPlatform.a(SDL_uikitappdelegate.o)

There are some third party SDK which require this flag

We fixed this problem by running fuse build --target=iOS -adebug which opens Xcode and then manually adding the flag -ObjC to “Build settings”.

But as you can imagine, this is terrible while developing new features. You end up repeating the routine 100 times a day.

Is there a solution for this in the .unoproj file or through uxl ? We did manage to get linker flags in the Xcode project with a .Uno file and the right require in that file. But unfortunately that only produces an entry in Xcode with the prefix “-l*” so we ended up with “-lobjc” which doesn’t work. We actually need “-ObjC”.

Please advise how this can be done.

Hey Alex and Rene,

Thanks for your reports. I’ve created two internal issues to track these problems: One for the duplicate symbols, and one for adding linker flags other than -l flags, which indeed doesn’t seem to be possible currently. We’ll keep you posted on how that goes.

Thanks again, Olle

Alex, I’m not able to reproduce your issue. Can you provide an app, preferably minimal, that exhibits the link error when adding the flag?

If you don’t want to post your code publicly, you can upload it here, where it’ll be available only to the Fuse team.