Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 923
alex willrock Avatar asked Sep 15 '14 04:09

alex willrock


People also ask

How do I add PCH files to Xcode?

From your Xcode menu, select File > New > File... From iOS template options, select Other > PCH file. Name the file <target_name>-Prefix. pch, and then select Create.

What does PCH file do?

In computer programming, a precompiled header (PCH) is a (C or C++) header file that is compiled into an intermediate form that is faster to process for the compiler.


1 Answers

  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

like image 177
emotality Avatar answered Sep 20 '22 15:09

emotality