tags:

views:

45

answers:

2

After i updated iPhone SDK to 4.1 I can no longer compile neither for Simulator or Device. I get the following message:

error: can't exec '/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2' (No such file or directory)

Solution for this?

+2  A: 

Check to see if it is there and accessible, sudo ls -l /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2. Mine has these permissions: -rwxr-xr-x 1 root wheel 166128 Jul 26 15:05 /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2

Have you tried reinstalling yet?

Peter DeWeese
I've tried reinstalling. gcc-4.2 isn't even found in the folder by ls :( Can I add it manually somehow or is it a special version for iPhone?
Accatyyc
+1  A: 

I solved this by doing:

sudo cp /usr/bin/gcc-4.2 /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2
Accatyyc