# Xcode project link error with ObjC flag

**URL:** <https://forums.fusetools.com/t/xcode-project-link-error-with-objc-flag/752>\
**Category:** Bug Reports\
**Created:** [January 5, 2016, 4:54pm UTC](https://forums.fusetools.com/t/xcode-project-link-error-with-objc-flag/752 "2016-01-05T16:54:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![alex3tdev](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@alex3tdev](https://forums.fusetools.com/u/alex3tdev)\
**Post date:** [January 5, 2016, 4:54pm UTC](https://forums.fusetools.com/t/xcode-project-link-error-with-objc-flag/752/1 "2016-01-05T16:54:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Rene](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/rene/32/318_2.png) [@Rene](https://forums.fusetools.com/u/Rene)\
**Post date:** [August 12, 2016, 5:20am UTC](https://forums.fusetools.com/t/xcode-project-link-error-with-objc-flag/752/2 "2016-08-12T05:20:38Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Olle\_Fredriksson](https://avatars.discourse-cdn.com/v4/letter/o/e95f7d/32.png) [@Olle\_Fredriksson](https://forums.fusetools.com/u/Olle_Fredriksson)\
**Post date:** [August 12, 2016, 8:07am UTC](https://forums.fusetools.com/t/xcode-project-link-error-with-objc-flag/752/3 "2016-08-12T08:07:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Olle\_Fredriksson](https://avatars.discourse-cdn.com/v4/letter/o/e95f7d/32.png) [@Olle\_Fredriksson](https://forums.fusetools.com/u/Olle_Fredriksson)\
**Post date:** [August 15, 2016, 10:20am UTC](https://forums.fusetools.com/t/xcode-project-link-error-with-objc-flag/752/4 "2016-08-15T10:20:45Z")

</div>

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](https://www.dropbox.com/request/ZgndLtJQm5eGzG9cicGK), where it’ll be available only to the Fuse team.
