Saturday 20 June 2015

Quick fix - duplicate symbols for architecture x86_64 issue

Go through bellow steps and resolve the issue.


1. Please check your source bundled - Does have any files added two time?  If yes, then delete one of any one copy, and chose option remove from reference.

For example test.h or test.m  file have in your bundled but by mistake test.h or test.m files again added in some other directory, now your bundled having a two clone copy of same files.

2. Be careful check your code structure, have there any global class declaration & create instance of it, just remove instance from there and keep in app delegate for global access or create instance in  class file where you want that class.


For example your bundled have global.h  file this file having list of declaration header files for global access, if also you have created instance there so remove it from there.

Code look like in your global.h file.

#import "test.h"

test *objTest;


Above code having issue some time, get duplicate symbol error while compile source. Just declaration is ok but can't create  instance in global.h file, instance create in app delegate or in class file where you want.

Optimised above cases in XCODE 6.3.2, OS X 10.10.3





Bhavesh Kumbhani
IOS Software Professional 

follow on
Facebook
LinkedIn