Link errors when using Master branch

Subforum for discussion and help with ScummVM's iPhone port

Moderator: ScummVM Team

Post Reply
MrPerphekt
Posts: 9
Joined: Fri Feb 03, 2012 12:19 am

Link errors when using Master branch

Post by MrPerphekt »

Good afternoon,

Using the latest code in the Master branch from GitHub and the Official SDK I am getting duplicate symbol errors when linking. I've managed to correct all the compiler errors but now when linking I am getting duplicate symbol errors for the various codecs. Not sure what is going on since the header files are only included once. Even switching to #import doesn't help. If I comment out the implementation code for a given codec the linker will just in turn bitch about the next one. I am building using Xcode 4 and the iOS 5.0 SDK. I'm building using the Release configuration and my target is iOS Device, not the simulator. Any advice will be greatly appreciated. Thanks!

Linker Error:
Duplicate symbol __ZN5Video14CDToonsDecoderC1Ett in /Users/TasteMyFruit/Library/Developer/Xcode/DerivedData/scummvm-apvsofnxqfjimbfypqtdqjexxxfw/Build/Intermediates/scummvm.build/Release-iphoneos/ScummVM-iPhone.build/Objects-normal/armv7/cdtoons-87D9CF1AA7D2465E.o and /Users/TasteMyFruit/Library/Developer/Xcode/DerivedData/scummvm-apvsofnxqfjimbfypqtdqjexxxfw/Build/Intermediates/scummvm.build/Release-iphoneos/ScummVM-iPhone.build/Objects-normal/armv7/cdtoons-87D9CF1AA7D2465E.o for architecture armv7
User avatar
tsoliman
ScummVM Developer
Posts: 404
Joined: Wed Jan 19, 2011 3:47 pm
Location: USA

Post by tsoliman »

If you google "duplicate symbol" it will suggest xcode.
So searching for "duplicate symbol xcode" and the first match has the solution.

DISCLAIMER: I know nothing about compiling for iOS.
MrPerphekt
Posts: 9
Joined: Fri Feb 03, 2012 12:19 am

Post by MrPerphekt »

Thanks for the response! I originally searched for "duplicate symbols in xcode 4" but I just got a bunch of very specific scenarios, none of which applied to mine. I found the StackOverflow article you alluded to and that sounds exactly like what is happening so thank you! I'll give it a shot when I get home and will post the results along with that link in case anyone else runs into this issue. Thanks again.
MrPerphekt
Posts: 9
Joined: Fri Feb 03, 2012 12:19 am

Results

Post by MrPerphekt »

Thanks again for the help! After reading the article on StackOverflow I managed to get rid of the duplicate symbol errors but now I get a TON of other linker errors such as:

"__ZN5Scumm23makeLogicHEbaseball2001EPNS_17ScummEngine_v90heE", referenced from:

__ZN5Scumm7LogicHE11makeLogicHEEPNS_17ScummEngine_v90heE in logic_he.o

"__ZN8Graphics7BdfFont13cacheFontDataERKS0_RKN6Common6StringE", referenced from:

__ZN3GUI11ThemeEngine8loadFontERKN6Common6StringERS2_ in ThemeEngine.o

"__ZN4Kyra6GUI_v115redrawHighlightERKNS_4MenuE", referenced from:

__ZN4Kyra6GUI_v214renewHighlightERNS_4MenuE in gui_v2.o

"__ZN3Agi9AgiEngine12setupOpcodesEv", referenced from:

__ZN3Agi9AgiEngineC2EP7OSystemPKNS_18AGIGameDescriptionE in agi.o

"__ZN3Sci13GfxControls1614kernelDrawListEN6Common4RectENS_5reg_tEssPPKcisssbb", referenced from:

__ZN3Sci21_k_GenericDrawControlEPNS_11EngineStateENS_5reg_tEb in kgraphics.o
MrPerphekt
Posts: 9
Joined: Fri Feb 03, 2012 12:19 am

Finally got it to build!

Post by MrPerphekt »

I finally managed to get the master branch to build for iOS using the Official SDK. Turns out the project is missing some files and also had some missing library references.
User avatar
tsoliman
ScummVM Developer
Posts: 404
Joined: Wed Jan 19, 2011 3:47 pm
Location: USA

Post by tsoliman »

Would you be interested in contributing your changes?
Either a github pull request or a patch in the patch tracker would work.
MrPerphekt
Posts: 9
Joined: Fri Feb 03, 2012 12:19 am

Post by MrPerphekt »

I would love to contribute. My only concern is that I'm new to Apple Development and the XCode IDE so I'm not very confident in some of the stuff I did but my build does work and I've been playing LucasArts games all night. I did have to comment out the loading of the SCI plugin because of two unresolved linker errors about get_SCI_type and the other method used in the LINK_PLUGIN macro. I need to add one more engine that wasn't in the project and fix the SCI errors. I can do a branch or something so I can check in what I have, I just don't want to corrupt the master branch without someone validating my changes.
User avatar
tsoliman
ScummVM Developer
Posts: 404
Joined: Wed Jan 19, 2011 3:47 pm
Location: USA

Post by tsoliman »

Pull requests and patches aren't the same as directly committing to the code repository. They are "proposals". A team member would have to take you what you've submitted and commit it.

EDIT: I should have made it clear that it means they're going to review it before they put it into the repository.
MrPerphekt
Posts: 9
Joined: Fri Feb 03, 2012 12:19 am

Project in the Sourceforge Tracker

Post by MrPerphekt »

Hi all,

I just submitted my xcode project as a patch request in the SourceForge Tracker. If you want to grab it you can get it from there. Just look under tracker and you'll see my request with the project attached.

https://sourceforge.net/tracker/?func=d ... tid=418822
Post Reply