Apple LLVM Compiler 3.1 error clang

前端 未结 9 2129
长发绾君心
长发绾君心 2020-12-08 05:19

I\'m trying to make an archive (ipa) for my iOS (iPhone) app but I\'m receiving a strange error:

Apple LLVM Compiler 3.1 error clang: error: no such file or          


        
相关标签:
9条回答
  • 2020-12-08 05:45

    OK, what you need to do is go to build settings and scroll down to :

    Apple LLVM Compiler 3.1 - Language
    

    Search in the table for 'other c flags'. What you see is armv6? Right? :)

    Change armv6 to: -DNS_BLOCK_ASSERTIONS=1

    Good luck, Nathan


    1. Click on your project (Usually on top of your in-Xcode-file-browser - blue Xcode icon).
    2. Go to [Your project] under Targets.
    3. Click on the Build Settings.
    4. Search in the search box for: 'other c flag'. (On mine there were three options - disregard all options except the bold 'Other C Flags.')
    5. Click on the third column of 'Other C Flags' and enter: '-DNS_BLOCK_ASSERTIONS=1'

    Image of what It should Look like when you're done

    That should do it :)

    (I also had some files missing, look at your build log and make sure there are no other errors above the one mentioned for this question)

    Good luck!

    P.S. - May Xcode die a slow and painful death!

    0 讨论(0)
  • 2020-12-08 05:45

    I got similar error. Following steps fixed my problem, not sure if this is going to work for you, but worth a shot:

    Issue: Compiler unable to locate [myapp]-Prefix.pch file. This is because Location of Prefix Header file [myapp]-Prefix.pch in Project Target is incorrect.

    The location is defined in Project Target/Build setting. You will need to go to: Project Target -> Build Settings Tab -> Scroll down and Look for "Apple LLVM Compiler 3.1 - Language" Underneath this node -> You will find the key/value setting for Prefix Header file.

    Normally Prefix header file is located under "Supporting File" Folder in your project

    Please note, I am using Xcode 4.3.2 so if you are using a version other than this you might have to look around a bit for this setting.

    Happy Coding!

    0 讨论(0)
  • 2020-12-08 05:50

    For me I was referencing a PCH that didn't exist, just search for 'pch' in your build settings and make sure any .pch files being referenced actually exist at that location, if not, update

    0 讨论(0)
提交回复
热议问题