ld: 60 duplicate symbols for architecture x86_64

Having technical difficulties with Supermodel? Last-minute wardrobe malfunction? Get help here.
Forum rules
Keep it classy!

  • No ROM requests or links.
  • Do not ask to be a play tester.
  • Do not ask about release dates.
  • No drama!

ld: 60 duplicate symbols for architecture x86_64

Postby christian776 » Sat Apr 01, 2017 5:00 pm

Hi guys,

I'm getting a duplicated symbols error when trying to compile the latest revision, r566. Maybe is there a variable that's being included twice in a cpp file?

Here's the log
Code: Select all
gcc -o bin/Supermodel -framework SDL -framework AGL -framework OpenGL -framework GLUT -framework Cocoa -lz -lm -lstdc++ -F/Library/Frameworks/  obj/PPCDisasm.o obj/Games.o obj/NewConfig.o  obj/ConfigBuilders.o  obj/GameLoader.o obj/ByteSwap.o obj/INIFile.o obj/BlockFile.o obj/93C46.o obj/ROMLoad.o obj/unzip.o obj/ioapi.o obj/Error.o obj/glew.o obj/Shader.o obj/Real3D.o obj/Legacy3D.o obj/Models.o obj/TextureRefs.o obj/New3D.o obj/Mat4.o obj/Model.o obj/PolyHeader.o obj/Texture.o obj/TextureSheet.o obj/VBO.o obj/Vec.o obj/R3DShader.o obj/R3DFloat.o obj/R3DScrollFog.o obj/Render2D.o obj/TileGen.o obj/Model3.o obj/ppc.o obj/Main.o obj/Audio.o obj/Thread.o obj/SoundBoard.o obj/SCSP.o obj/SCSPDSP.o obj/68K.o obj/m68kcpu.o obj/m68kopnz.o obj/m68kopdm.o obj/m68kopac.o obj/m68kops.o obj/DSB.o obj/Z80.o obj/IRQ.o obj/53C810.o obj/PCI.o obj/RTC72421.o obj/DriveBoard.o obj/MPC10x.o obj/Input.o obj/Inputs.o obj/InputSource.o obj/InputSystem.o obj/InputTypes.o obj/MultiInputSource.o obj/SDLInputSystem.o obj/Outputs.o obj/amp_audio.o obj/amp_dump.o obj/amp_getbits.o obj/amp_getdata.o obj/amp_huffman.o obj/amp_layer2.o obj/amp_layer3.o obj/amp_misc2.o obj/amp_position.o obj/amp_transform.o obj/amp_util.o obj/Crypto.o obj/Format.o obj/Logger.o obj/tinyxml2.o obj/ByteSwap.o obj/Format.o obj/NewConfig.o obj/ConfigBuilders.o obj/GameLoader.o obj/SDLMain_tmpl.o
duplicate symbol __ZN4Util12FlipEndian16EPhm in:
    obj/ByteSwap.o
duplicate symbol __ZN4Util12FlipEndian32EPhm in:
    obj/ByteSwap.o
duplicate symbol __ZN4Util3HexEt in:
    obj/Format.o
duplicate symbol __ZN4Util3HexEjm in:
    obj/Format.o
duplicate symbol __ZN4Util3HexEj in:
    obj/Format.o
duplicate symbol __ZN4Util3HexEh in:
    obj/Format.o
duplicate symbol __ZN4Util7StricmpEPKcS1_ in:
    obj/Format.o
duplicate symbol __ZN4UtillsERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEERKNS_6FormatE in:
    obj/Format.o
duplicate symbol __ZN4Util7ToLowerERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE in:
    obj/Format.o
duplicate symbol __ZN4Util14TrimWhiteSpaceERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE in:
    obj/Format.o
duplicate symbol __ZNK4Util6Config4Node19CheckEmptyOrMissingEv in:
    obj/NewConfig.o
duplicate symbol __ZN4Util6Config4NodeD2Ev in:
    obj/NewConfig.o
duplicate symbol __ZN4Util6Config4NodeC2Ev in:
    obj/NewConfig.o
duplicate symbol __ZN4Util6Config4NodeD1Ev in:
    obj/NewConfig.o
duplicate symbol __ZN4Util6Config4NodeC1Ev in:
    obj/NewConfig.o
duplicate symbol __ZNK4Util6Config4Node8ToStringEm in:
    obj/NewConfig.o
duplicate symbol __ZNK4Util6Config4Node9SerializeEPNSt3__113basic_ostreamIcNS2_11char_traitsIcEEEEm in:
    obj/NewConfig.o
duplicate symbol __ZN4Util6Config4NodeC2ERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEESA_ in:
    obj/NewConfig.o
duplicate symbol __ZN4Util6Config4NodeC1ERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEESA_ in:
    obj/NewConfig.o
duplicate symbol __ZN4Util6Config4Node4SwapERS1_ in:
    obj/NewConfig.o
duplicate symbol __ZN4Util6Config4NodeaSEOS1_ in:
    obj/NewConfig.o
duplicate symbol __ZN4Util6Config4NodeC2EOS1_ in:
    obj/NewConfig.o
duplicate symbol __ZN4Util6Config4NodeC1EOS1_ in:
    obj/NewConfig.o
duplicate symbol __ZN4Util6Config4Node8DeepCopyERKS1_ in:
    obj/NewConfig.o
duplicate symbol __ZN4Util6Config4NodeaSERKS1_ in:
    obj/NewConfig.o
duplicate symbol __ZN4Util6Config4NodeC2ERKS1_ in:
    obj/NewConfig.o
duplicate symbol __ZN4Util6Config4NodeC1ERKS1_ in:
    obj/NewConfig.o
duplicate symbol __ZN4Util6Config4Node8AddChildERS1_RNSt3__110shared_ptrIS1_EE in:
    obj/NewConfig.o
duplicate symbol __ZNK4Util6Config4NodeixERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE in:
    obj/NewConfig.o
duplicate symbol __ZN4Util6Config4Node6TryGetERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE in:
    obj/NewConfig.o
duplicate symbol __ZNK4Util6Config4Node6TryGetERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE in:
    obj/NewConfig.o
duplicate symbol __ZN4Util6Config4Node3GetERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE in:
    obj/NewConfig.o
duplicate symbol __ZNK4Util6Config4Node3GetERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE in:
    obj/NewConfig.o
duplicate symbol __ZNK4Util6Config4Node11MissingNodeERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE in:
    obj/NewConfig.o
duplicate symbol __ZN4Util6Config4NodeC2ERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE in:
    obj/NewConfig.o
duplicate symbol __ZN4Util6Config4NodeC1ERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE in:
    obj/NewConfig.o
duplicate symbol __ZN4Util6Config12WriteINIFileERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKNS0_4NodeES9_ in:
    obj/ConfigBuilders.o
duplicate symbol __ZN4Util6Config16MergeINISectionsEPNS0_4NodeERKS1_S4_ in:
    obj/ConfigBuilders.o
duplicate symbol __ZN4Util6Config11FromXMLFileEPNS0_4NodeERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE in:
    obj/ConfigBuilders.o
duplicate symbol __ZN4Util6Config11FromINIFileEPNS0_4NodeERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE in:
    obj/ConfigBuilders.o
duplicate symbol __ZN4Util6Config7FromXMLEPNS0_4NodeERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE in:
    obj/ConfigBuilders.o
duplicate symbol __ZNK10GameLoader4File7MatchesERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEj in:
    obj/GameLoader.o
duplicate symbol __ZN10GameLoader8LoadROMsEP6ROMSetRKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEPKNS_10ZipArchiveESA_SD_ in:
    obj/GameLoader.o
duplicate symbol __ZNK10GameLoader10ChooseGameERKNSt3__13setINS0_12basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEENS0_4lessIS7_EENS5_IS7_EEEERKS7_ in:
    obj/GameLoader.o
duplicate symbol __ZN10GameLoader18CompareFilesByNameERKNSt3__110shared_ptrINS_4FileEEES5_ in:
    obj/GameLoader.o
duplicate symbol __ZNK10GameLoader33IdentifyCompleteGamesInZipArchiveERKNS_10ZipArchiveE in:
    obj/GameLoader.o
duplicate symbol __ZNK10GameLoader17ComputeRegionSizeEPjRKNSt3__110shared_ptrINS_6RegionEEERKNS_10ZipArchiveE in:
    obj/GameLoader.o
duplicate symbol __ZN10GameLoader10LoadRegionEP3ROMRKNSt3__110shared_ptrINS_6RegionEEERKNS_10ZipArchiveE in:
    obj/GameLoader.o
duplicate symbol __ZNK10GameLoader10LookupFileERKNSt3__110shared_ptrINS_4FileEEERKNS_10ZipArchiveE in:
    obj/GameLoader.o
duplicate symbol __ZN10GameLoader14LoadZippedFileEPNSt3__110shared_ptrIhEEPmRKNS1_INS_4FileEEERKNS_10ZipArchiveE in:
    obj/GameLoader.o
duplicate symbol __ZN10GameLoader6Region6CreateERKS_RKN4Util6Config4NodeE in:
    obj/GameLoader.o
duplicate symbol __ZN10GameLoader4File6CreateERKS_RKN4Util6Config4NodeE in:
    obj/GameLoader.o
duplicate symbol __ZN10GameLoader8ParseXMLERKN4Util6Config4NodeE in:
    obj/GameLoader.o
duplicate symbol __Z13StripFilenameRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE in:
    obj/GameLoader.o
duplicate symbol __ZN10GameLoader13MissingAttribERKS_RKN4Util6Config4NodeERKNSt3__112basic_stringIcNS7_11char_traitsIcEENS7_9allocatorIcEEEE in:
    obj/GameLoader.o
duplicate symbol __ZN10GameLoader4LoadEP4GameP6ROMSetRKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE in:
    obj/GameLoader.o
duplicate symbol __ZNK10GameLoader14LoadZipArchiveEPNS_10ZipArchiveERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE in:
    obj/GameLoader.o
duplicate symbol __ZN10GameLoader17LoadDefinitionXMLERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE in:
    obj/GameLoader.o
duplicate symbol __ZN10GameLoaderC2ERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE in:
    obj/GameLoader.o
duplicate symbol __ZN10GameLoaderC1ERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE in:
    obj/GameLoader.o
ld: 60 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [all] Error 1
christian776
 
Posts: 13
Joined: Sun Mar 26, 2017 2:04 pm

Re: ld: 60 duplicate symbols for architecture x86_64

Postby Bart » Sun Apr 02, 2017 9:14 am

This happens when object files are included twice in the object list. I can see that Format.o is repeated. Get rid of the dupes and you will be set.
User avatar
Bart
Site Admin
 
Posts: 2058
Joined: Thu Sep 01, 2011 2:13 pm
Location: New York City

Re: ld: 60 duplicate symbols for architecture x86_64

Postby christian776 » Mon Apr 03, 2017 5:35 am

Yep, that worked !! Thanks !
christian776
 
Posts: 13
Joined: Sun Mar 26, 2017 2:04 pm


Return to The Fitting Room

Who is online

Users browsing this forum: No registered users and 2 guests