Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1 error [duplicate]

Possible Duplicate:
gcc-4.2 failed with exit code 1 iphone

I am getting the error

Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1

every time I try to run the program on the iPhone device and the Simulator.

I am also seeing this:

ld: duplicate symbol .objc_class_name_MainView in /Volumes/Mark's Flash Drive/iFtB/build/iFtB.build/Debug-iphonesimulator/iFtB.build/Objects-normal/i386/MainView.o and /Volumes/Mark's Flash Drive/iFtB/build/iFtB.build/Debug-iphonesimulator/iFtB.build/Objects-normal/i386/iFtBAppDelegate.o

too. Could this be part of the problem?

Thanks in advance,

Mr. Man

like image 704
Mark Szymanski Avatar asked Jan 30 '10 01:01

Mark Szymanski


2 Answers

It means the MainView class is defined twice or more.

Check:

  1. If the MainView class's @implementation appears in any .h files. It shouldn't.
  2. If there are 2 MainView classes define by you and a third-party library. You may need to rename your MainView class.
like image 63
kennytm Avatar answered Nov 08 '22 21:11

kennytm


As KennyTM is correct.

I accidentally imported the .m file instead of the .h an received this lovely error.

like image 30
ethyreal Avatar answered Nov 08 '22 22:11

ethyreal