Question

I'm not able to compile a project under Xcode Version 4.6.3 (4H1503) when using files located in /usr/local. The error is 'cryptopp/cryptlib.h' file not found. This is similar to a number of other questions, but the 'try this' mentioned in the other topics have not helped.

I have a directory with headers in them. The directory is /usr/local/ios-armv7/include. Within that directory the headers are located in cryptopp/. I am including the files with both #include <cryptopp/cryptlib.h> and #include "cryptopp/cryptlib.h".

header files on disk

In Xcode, I have /usr/local/ios-armv7/include and /usr/local/ios-armv7/include/cryptopp set in every place that will take a path for headers or include files. There are no target overrides. I verified the paths are being added to the command line through -I switches.

Xcode search paths

I've tried toggling ALWAYS_SEARCH_USER_PATHS. I've tried toggling recursive. I've also tried adding and removing the trailing slash (/). In between each attempts, I perform a full clean. I also used Organizer to remove all data. I even tried using a different compiler (GCC-4.2, which appears completely broken).

What is the trick to get Xcode to honor my search path?

Was it helpful?

Solution 2

I tracked this problem down to permissions on usr/local/ios-arm7. The permissions were 0600. I'm not sure how/why Finder was able to view them since I did not have permission. After chmod -R 0644 usr/local/ios-arm7, everything worked as expected. I could also remove all the extra paths I threw at the project.

OTHER TIPS

Wow...What a pain. I just figured it out (was fighting this same issue for some time).

It looks like there are two sets of settings, one for the project, and one for the target.

Look to the left of your build settings pane. If you have the project highlighted, hit the 'targets' icon, and then you'll see there is another set of build settings. As soon as I added '/usr/local/include' to my 'Header Search Paths' section, it found the external headers.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top