3

I have some serious issues...I need to build a project from another developer in ios 5 and Xcode 4.2 which which has both RestKit and Three20 library...

At first I deleted those two libraries and used fresh copies of two...they did built but I found out other developer edited the restkit and used three20 inside the restkit also...So I have to keep the old restkit...then restkit is ok but I had to integrate three20 both to my main and restkit project...then I integrated that..after integrating I found this error..

ld: duplicate symbol _OBJC_CLASS_$_TT_FIX_CATEGORY_BUG_UISplitViewController_TTNavigator in /Users/mdrezaurrahman/Library/Developer/Xcode/DerivedData/Fake_Conversation-dyigdwifnataxadzsxfirsdjnhsc/Build/Products/Debug-iphonesimulator/libThree20UICommon.a(UISplitViewController+TTNavigator.o) and /Users/mdrezaurrahman/Library/Developer/Xcode/DerivedData/Fake_Conversation-dyigdwifnataxadzsxfirsdjnhsc/Build/Products/Debug-iphonesimulator/libRestKit.a(UISplitViewController+TTNavigator.o) for architecture i386

Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang failed with exit code 1

then I thought it is because two project is using same libraries at a time..Then I used two copies of Three20 and integrated one with main project and another with restkit project

then I faced this error

ld: duplicate symbol _OBJC_IVAR_$_TTSectionedDataSource._items in /Users/mdrezaurrahman/Library/Developer/Xcode/DerivedData/Fake_Conversation-bbrkduxuzifkumgngujfpbbboyzb/Build/Products/Debug-iphonesimulator/libRestKit.a(TTSectionedDataSource.o) and /Users/mdrezaurrahman/Library/Developer/Xcode/DerivedData/Fake_Conversation-bbrkduxuzifkumgngujfpbbboyzb/Build/Products/Debug-iphonesimulator/libThree20UI.a(TTSectionedDataSource.o) for architecture i386

Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang failed with exit code 1

I think this is the same error...can anyone show me the path?

Shoeb Amin
  • 599
  • 1
  • 8
  • 18

1 Answers1

1

Looks like you are trying to link two copies of the Three20 Library into one binary. That would not work. If the copy of RestKit you obtained already contains Three20 then you would not need to link it separately. If it only contains part of Three20, try to get rid of that part.

tonklon
  • 6,777
  • 2
  • 30
  • 36
  • 1
    there are some header files #import which was showing error and header search path was ok on restkit...but under restkit there were no three20 binaries..they were calling it from the binary of parent project...all the stuffs seem so confusing – Shoeb Amin Feb 28 '12 at 17:23
  • The error messages clearly state that libRestKit.a contains a symbol called `TTSectionedDataSource`. Above you mentioned, that you had to 'integrate' Three20 into both RestKit and your main project. I guess the error happened there. Both RestKit and your main should be able to find Three20's headers, but only one of them (most likely main) should link Three20. – tonklon Feb 28 '12 at 19:57
  • header search path of the target of restkit is ../three20/Build/Products/three20 three20 is both restkit and three20 folder are on same parent directory...to be confirmed is my approach is correct? I took a fresh copy of old project... – Shoeb Amin Feb 29 '12 at 06:39
  • I have integrated Three20 only to the main project now...and under restkit there is a target file named three20 support...I showed it the path "./three20/Build/Products/three20"..now from restkit I cant import which is needed – Shoeb Amin Feb 29 '12 at 12:30
  • As I already said. RestKit must be able to find the Three20 headers. Please adapt the header search path of the three20 support target to point to the Three20 headers. – tonklon Mar 01 '12 at 20:02
  • thanks..I have built it successfully...I have built all the projects individually and this works..Thanks... – Shoeb Amin Mar 02 '12 at 14:40