Sunday, January 30, 2011

gcc-4.2 failed with exit code 1

When compiling an iPhone app. I got gcc-4.2 failed with exit code 1

This was a strange one. Which I still don't fully understand.

It was happening because I had a duplicate global variable in two different .m files.

This was found by right clicking on the error message and selecting "Open These Latest Results as Transcript Text File." This revealed something like:

"ld: duplicate symbol _mouseSwiped"

Removing the duplicate symbol solved it for me.

Although I don't think I am properly understanding how Objective C works yet.

No comments:

Post a Comment