简体   繁体   中英

Apple Mach-O Linker Error When Building App

duplicate symbol _y in:
/Users/archanamehta/Library/Developer/Xcode/DerivedData/GuideforCODGhosts-ftrljupdxywopwckemagyiliitss/Build/Intermediates/GuideforCODGhosts.build/Debug-iphonesimulator/GuideforCODGhosts.build/Objects-normal/i386/SecondaryWeaponsViewController.o
/Users/archanamehta/Library/Developer/Xcode/DerivedData/GuideforCODGhosts-ftrljupdxywopwckemagyiliitss/Build/Intermediates/GuideforCODGhosts.build/Debug-iphonesimulator/GuideforCODGhosts.build/Objects-normal/i386/PrimaryWeaponsViewController.o

ld: 1 duplicate symbol for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)

I have an error in my application. Above is the error I am getting. I am not sure what to do. Please help.

Thanks

EDIT Source code for .h file of PrimaryWeaponsViewController http://gyazo.com/1dd400959f043bddbc59ec8d0c4f6c60

Source code for .h file SecondaryWeaponsViewController http://gyazo.com/76b3d1fa2b766e904af41489e36cba60

The error lines provided have the name of the files where the error is:

SecondaryWeaponsViewController PrimaryWeaponsViewController

Look at these files.

Best bet given no source code is that there is a variable _y that is declared a global. Note that @propertie s *auto-generate instance variables and add a leading "_"* to them.

Post the code for these methods, how they are related and the portions dealing with an variable "y"/ This could be a variable declared in a .h header file that both classes import.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM