views:

798

answers:

0

Hi,

I am new to Mac OS and iPhone Development.

I had already installed the earlier iPhone SDK (version prior to the latest 3.1) into my Mac OS 10.6. I was not able to run the hello world program as while loading the simulator it was giving me an error saying that it cannot find the right SDK.

I had assumed that the old SDK is not compatible with the new Mac OS 10.6 (Snow Leopard). I had then uninstalled the old iPhone SDK using Terminal tool, using the command line given in the xCode uninstallation guide.

Installed the latest iPhone SDK (version 3.1), and then tried to compile the hello world app. Now I am getting an error:

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

I had located the above mentioned directory and could not find the file: "gcc-4.2" as mentioned in the error. Instead executable files like "i686-apple-darwin10-gcc-4.2.1" are present there. Looking at the detailed error message (given below), it seems my PATH variable is totally messed up and not pointing to the correct compiler EXE.

I am totally confused here, as I don't know how to correctly set up the ENV, as I though the iPhone installer does that automatically. Please help me out.

Thanks, JC.


Error Message:

Build helloworldxc of project helloworldxc with configuration Debug

ProcessPCH /var/folders/P-/P-zMg0EzHree36VYyqKEvU+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/helloworldxc_Prefix-gylsydenhucpkgfnujlgvzvhfhzd/helloworldxc_Prefix.pch.gch helloworldxc_Prefix.pch normal i386 objective-c com.apple.compilers.gcc.4_2 cd "/Users/jaideepchakravorty/Jaideep/R&D/helloworldxc"

setenv LANG en_US.US-ASCII

setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -x objective-c-header -arch i386 -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -D__IPHONE_OS_VERSION_MIN_REQUIRED=30000 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.sdk -fvisibility=hidden -mmacosx-version-min=10.5 -gdwarf-2 -iquote /Users/jaideepchakravorty/Jaideep/R&D/helloworldxc/build/helloworldxc.build/Debug-iphonesimulator/helloworldxc.build/helloworldxc-generated-files.hmap -I/Users/jaideepchakravorty/Jaideep/R&D/helloworldxc/build/helloworldxc.build/Debug-iphonesimulator/helloworldxc.build/helloworldxc-own-target-headers.hmap -I/Users/jaideepchakravorty/Jaideep/R&D/helloworldxc/build/helloworldxc.build/Debug-iphonesimulator/helloworldxc.build/helloworldxc-all-target-headers.hmap -iquote /Users/jaideepchakravorty/Jaideep/R&D/helloworldxc/build/helloworldxc.build/Debug-iphonesimulator/helloworldxc.build/helloworldxc-project-headers.hmap -F/Users/jaideepchakravorty/Jaideep/R&D/helloworldxc/build/Debug-iphonesimulator -I/Users/jaideepchakravorty/Jaideep/R&D/helloworldxc/build/Debug-iphonesimulator/include -I/Users/jaideepchakravorty/Jaideep/R&D/helloworldxc/build/helloworldxc.build/Debug-iphonesimulator/helloworldxc.build/DerivedSources/i386 -I/Users/jaideepchakravorty/Jaideep/R&D/helloworldxc/build/helloworldxc.build/Debug-iphonesimulator/helloworldxc.build/DerivedSources -c /Users/jaideepchakravorty/Jaideep/R&D/helloworldxc/helloworldxc_Prefix.pch -o /var/folders/P-/P-zMg0EzHree36VYyqKEvU+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/helloworldxc_Prefix-gylsydenhucpkgfnujlgvzvhfhzd/helloworldxc_Prefix.pch.gch

while compiling hellowworldxc_Prefix.pch,

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