xcode 6 pch.file not found

前端 未结 9 1927
野的像风
野的像风 2020-12-07 12:37

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/will         


        
9条回答
  •  南笙
    南笙 (楼主)
    2020-12-07 13:01

    Here is a description what you should do

    1. Click on the first folder under the blue page with the project name. The folder with also have the project name next to it.

    2. File > New File > iOS > Other

    3. Click on PCH File

    4. Click Next

    5. Save As: PrefixHeader

    6. Click the first checkbox under Targets ONLY; if others are checked, uncheck them

    7. Click Create

    8. If the Prefix Header" file ended up in a different folder, such as the Supporting Files folder, move it up to the top folder you clicked on in step 1

    9. Click on the blue page at the top of the left sidebar with the project name next tot it. This is just above the folder you clicked on in step 1

    10. Click on the Build Settings tab

    11. In the search bar, type in, Prefix Header and press the Return/Enter key

    12. Look for Apple LLVM 6.0 or 7.0 - Language. 6.0 refers to Xcode 6 and 7.0 refers to Xcode 7. This makes no difference.

    13. Make sure Increase Sharing of Precompiled Headers is set to No and that Precompile Prefix Header is set to No

    14. Find the Prefix Header line just under the Precompile Prefix Header Line. Move the cursor over about 5 inches, but stay on the same line. Double-Click. A box will open.

    15. Type in the name of your project (this is stated next to the folder you clicked on in step 1)

      Example) Prereq for Overdue Assignment It is VERY IMPORTANT that you type in capitals where needed such as "P" in "Prereq." It is case sensitive. Now, put in forward slash (/). Then type in the name of the file you created in steps 2-7 (Again, this is Case Sensitive and you must put spaces where needed). I recommend that you leave the file as PrefixHeader (no spaces). After the filename, such as PrefixHeader, type in .pch ALL lower case.

    16. The final result should look something like this:

      Prereq for Overdue Assignment/PrefixHeader.pch

    17. Now, click on the Product menu (6 menus over from the file menu you clicked on in step 2). Then click on Clean

      You can bypass this step by holding command, shift, and K at the same time. Once you get the message, Clean Succeeded, move on to step 18.

    18. Click on the Product menu and go down to Build. Click on Build.

      You can bypass this step by holding command and B at the same time. You should get Build Completed.

    Thats it!

提交回复
热议问题