Duplicate Symbol Error for architecture i386

John picture John · Feb 7, 2013 · Viewed 18.1k times · Source

I got this error when i tried to build:

"duplicate symbol __Z8ERRCHECK11FMOD_RESULT in:

/Users/codemenmini2012-2/Library/Developer/Xcode/DerivedData/MagicSleepFullVersion-agxulkdijnxbqmbuigucmrczufyw/Build/Intermediates/MagicSleepFullVersion.build/Debug-iphonesimulator/MagicSleepFullVersion.build/Objects-normal/i386/MagicSleepViewController.o

/Users/codemenmini2012-2/Library/Developer/Xcode/DerivedData/MagicSleepFullVersion-agxulkdijnxbqmbuigucmrczufyw/Build/Intermediates/MagicSleepFullVersion.build/Debug-iphonesimulator/MagicSleepFullVersion.build/Objects-normal/i386/MagicSleepViewControllerIpad.o

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

How to solve this guys?

Answer

Ravindra Bagale picture Ravindra Bagale · Feb 7, 2013

The error may occur when you copy and paste the contents of one file to another file with its interface name which means two classes with same interface name.

In your code you have two different files with the same Interface name.