“You have two modules declaring the same class. Perhaps one is no longer needed?
You are importing any header file in both the files .m and .h Remove from one place.)
You are importing any .m file somewhere. :- (Import .h file instead of .m file)
You have defined and declared any const variable in outside(above)
the @interface{} in any of .h file, it might being duplicated. :- (Do it
in the .m file.)”
Actually my whole code is written in C++, so I don’t think that I am importing any .m or .cpp files anywhere.
I’ve done some digging in my code I found out that I had 2 AppDelegate.cpp and AppDelegate.h files on the XCode project. Once I deleted them almost all the errors went away except for this one:
duplicate symbol _main in:
/Users/felipe/Library/Developer/Xcode/DerivedData/IgualOuDiferente_Cocos3x-avmctbgxqubhqqezeuioqyscamrh/Build/Intermediates/IgualOuDiferente_Cocos3x.build/Debug-iphonesimulator/IgualOuDiferente_Cocos3x-mobile.build/Objects-normal/x86_64/main.o
/Users/felipe/Library/Developer/Xcode/DerivedData/IgualOuDiferente_Cocos3x-avmctbgxqubhqqezeuioqyscamrh/Build/Intermediates/IgualOuDiferente_Cocos3x.build/Debug-iphonesimulator/IgualOuDiferente_Cocos3x-mobile.build/Objects-normal/x86_64/IgualOuDiferente.o
ld: 1 duplicate symbol for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I am not sure where is the problem with this one, since I don’t import the main class anywhere in the code except on the stubs that were already created by the cocos new process.
I search my code and I found out that I had a IgualOuDiferente.cpp file which had a main method inside it. I am not quite sure where it came from, but once I commented out the main method, I was able to build it without any problems.