Why can't XCode 4 find my .h files during a build?

后端 未结 4 1685
面向向阳花
面向向阳花 2020-12-17 02:31

I have a project that won\'t build because the compiler (?) can\'t seem to find the .h files. I have tried using the full path, relative path and setting the Project Search

4条回答
  •  孤城傲影
    2020-12-17 03:23

    I went over many blog posts on how to fix this. This one helped me well.

    http://alwawee.com/wordpress/2011/12/01/zxingwidgetcontroller-h-not-found-zxing-installation-problem-solution/

    The problem was that header search paths were not properly defined. So I...

    1) Downloaded zxing 2.1

    2) From the download I copied: iphone, cpp, objc and readme and pasted in a folder names "zxing"

    3) I added the new folder "zxing" to my project (on my mac) not to the xcode app.

    4) From the created folder zxing I dragged the zxingwidget.xproje to my xcode project

    5) I followed all the steps you find in all the blogs

    KEY TO SOLVE THIS

    6) I followed this steps for xcode errors https://stackoverflow.com/a/14703794/1881577

    7) I followed this steps for header path file errors http://alwawee.com/wordpress/2011/12/01/zxingwidgetcontroller-h-not-found-zxing-installation-problem-solution/

    IMPORTANT NOTE: I had to do follow step 7) twice, I had to select the project target and assign header paths, and I had to select the project project and assign header paths.

    8) Build zxingwidget project (from the scheme select options)

    9) Build Run the project.

    Hope this helps other people as well.

提交回复
热议问题