Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
399 views
in Technique[技术] by (71.8m points)

objective c - xcode 6 pch.file not found

I load my project from xcode 5 to xcode 6 and see error myProject-prefix.pch is not found in myProjectTests, I add this file and see new error

Ld /Users/willrock/Library/Developer/Xcode/DerivedData/Мобильныи?_Extreme_Fitness-cdfxpafcwvsczkfjvlwznradvmhm/Build/Products/Debug-iphonesimulator/Мобильныи? Extreme FitnessTests.xctest/Мобильныи? Extreme FitnessTests normal x86_64
cd /Users/willrock/Desktop/ExtremeFitness
export IPHONEOS_DEPLOYMENT_TARGET=7.1
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -bundle -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk -L/Users/willrock/Library/Developer/Xcode/DerivedData/Мобильныи?_Extreme_Fitness-cdfxpafcwvsczkfjvlwznradvmhm/Build/Products/Debug-iphonesimulator -F/Users/willrock/Library/Developer/Xcode/DerivedData/Мобильныи?_Extreme_Fitness-cdfxpafcwvsczkfjvlwznradvmhm/Build/Products/Debug-iphonesimulator -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk/Developer/Library/Frameworks -filelist /Users/willrock/Library/Developer/Xcode/DerivedData/Мобильныи?_Extreme_Fitness-cdfxpafcwvsczkfjvlwznradvmhm/Build/Intermediates/Мобильныи? Extreme Fitness.build/Debug-iphonesimulator/Мобильныи? Extreme FitnessTests.build/Objects-normal/x86_64/Мобильныи? Extreme FitnessTests.LinkFileList -bundle_loader /Users/willrock/Library/Developer/Xcode/DerivedData/Мобильныи?_Extreme_Fitness-cdfxpafcwvsczkfjvlwznradvmhm/Build/Products/Debug-iphonesimulator/extreme_fitness.app/extreme_fitness -Xlinker -objc_abi_version -Xlinker 2 -framework XCTest -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=7.1 -framework XCTest -framework UIKit -framework Foundation -Xlinker -dependency_info -Xlinker /Users/willrock/Library/Developer/Xcode/DerivedData/Мобильныи?_Extreme_Fitness-cdfxpafcwvsczkfjvlwznradvmhm/Build/Intermediates/Мобильныи? Extreme Fitness.build/Debug-iphonesimulator/Мобильныи? Extreme FitnessTests.build/Objects-normal/x86_64/Мобильныи? Extreme FitnessTests_dependency_info.dat -o /Users/willrock/Library/Developer/Xcode/DerivedData/Мобильныи?_Extreme_Fitness-cdfxpafcwvsczkfjvlwznradvmhm/Build/Products/Debug-iphonesimulator/Мобильныи? Extreme FitnessTests.xctest/Мобильныи? Extreme FitnessTests

ld: file not found: /Users/willrock/Library/Developer/Xcode/DerivedData/Мобильныи?_Extreme_Fitness-cdfxpafcwvsczkfjvlwznradvmhm/Build/Products/Debug-iphonesimulator/extreme_fitness.app/extreme_fitness clang: error: linker command failed with exit code 1 (use -v to see invocation)

if i load project see in xctest

clang: error: no such file or directory: '/Users/willrock/Desktop/ExtremeFitness/extreme_fitness/extreme_fitness-Prefix.pch' clang: error: no input files Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1

but in xcode 5 is work fine

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
  1. Make new file: ?cmd+N
  2. iOS/Mac > Other > PCH File > YourProject-Prefix.pch.
  3. Make sure you display "All" and not "Basic". (Blue buttons)
  4. Project > Build Settings > Search: "Prefix Header".
  5. Under "Apple LLVM 7.0" you will get the Prefix Header key.
  6. Type file directory. e.g: "$(SRCROOT)/$(PROJECT_NAME)/ProjectName-Prefix.pch".
  7. Clean project: ?cmd+?shift+K
  8. Build project: ?cmd+B

Prefix Header Image


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...