开发者

How to modify the command XCode uses for creating the precompiled header?

I'm developing an iPhone application, and after making small changes to my code, when I tried to build I suddenly got the following build error when XCode tries to create precompiled header:

i686-apple-darwin10-gcc-4.2.1: n: No such file or directory
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1

From the build log I can see that the crashing line is the following:

ProcessPCH /var/folders/rM/rMuXVqLVH+8h38HuH1nVVU+++Tk/-Caches-/com.apple.Xcode.508/SharedPrecompiledHeaders/ProjectName_Prefix-gmsrnnethxkzvrgfurlstopfubtu/ProjectName_Prefix.pch.gch ProjectName_Prefix.pch normal i386 objective-c com.apple.compilers.gcc.4_2
cd ProjectDir
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 -DDEBUG -D__IPHONE_OS_VERSION_MIN_REQUIRED=30200 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk -fvisibility=hidden -mmacosx-version-min=10.6 -gdwarf-2 -fobjc-abi-version=2 -fobjc-legacy-dispatch -iquote ProjectDir/build/ProjectName.build/Debug-iphonesimulator/ProjectName.build/ProjectName-generated-files.hmap -IProjectDir/build/ProjectName.build/Debug-iphonesimulator/ProjectName.build/ProjectName-own-target-headers.hmap -IProjectDir/build/ProjectName.build/Debug-iphonesimulator/ProjectName.build/ProjectName-all-target-headers.hmap -iquote ProjectDir/build/ProjectName.build/Debug-iphonesimulator/ProjectName.build/ProjectName-project-headers.hmap -FProjectDir/build/Debug-iphonesimulator -I/ProjectDir/build/Debug-iphonesimulator开发者_JAVA技巧/include -I../three20/Build/Products/three20 -IProjectDir/build/ProjectName.build/Debug-iphonesimulator/ProjectName.build/DerivedSources/i386 -IProjectDir/build/ProjectName.build/Debug-iphonesimulator/ProjectName.build/DerivedSources n -c ProjectDir/ProjectName_Prefix.pch -o /var/folders/rM/rMuXVqLVH+8h38HuH1nVVU+++Tk/-Caches-/com.apple.Xcode.508/SharedPrecompiledHeaders/ProjectName_Prefix-gmsrnnethxkzvrgfurlstopfubtu/ProjectName_Prefix.pch.gch

i686-apple-darwin10-gcc-4.2.1: n: No such file or directory Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1

For some reason there is suddenly term 'n' in the middle of the command (... /DerivedSources n -c ...) , and as far as I can tell it really does not belong there.

I tried emptying XCode cache, cleaning the project, dependencies and precompiled headers, but when rebuilding I get the same error.

I also tried reverting all the changes I could think of that I had made after previous successful compile, but with no luck. I also tried reinstalling XCode (3.2.3) with no success. Other projects still seem to compile fine though.

How is it possible that this 'n' is suddenly appearing in the command, and is there any way for me to modify the line to get things working again?

Thanks in advance!


there is something wrong type with your project files. try to open the projectfile find it, vim yourproject.xcodeproj/project.pbproj

then search the "COMPILER_FLAGS = " /s COMPILER_FLAGS = "

if it searched, you would see the files which has wrong typed in your xcode projects.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜