xCode does not see X11 header files - header-files

Running xCode 4.6.3
I have my X11 header files stored in the following path:
/Library/Frameworks/Tk.framework/Versions/8.5/Headers/X11
I have a .cp file and include X11/X.h
Error shows X11/X.h file not found.
Have tried putting path /Library/Frameworks/Tk.framework/Versions/8.5/Headers/X11 where these files are located under Targets>Search Paths>Header Search Paths but with no success.
Can someone explain where to put this path so that xCode can find the file?
\

I had used the incorrect search path. There are two of them in Xcode.
To get these files recognized, I clicked the Project Name > Target Under Build Settings I went to Search Paths > User Header Search Paths > /Users/MYUSERNAME/Documents/MESA/Mesa-9.1.5/include/
Also selected the recursive option. This allowed Xcode to see the files.

Related

compiler error - opencv2/highgui.hpp: No such file or directory

I am a "very" beginner of OpenCV. I just downloaded it for my Windows and extracted.
I have read this post: http://opencv-srf.blogspot.ro/2011/09/capturing-images-videos.html about how to read webcam and I copied and pasted the code in a C++ file I created in "include" folder of OpenCV extracted archive.
When I try to run the program I get this error: Error in: /opencv/build/include/opencv2/highgui/highgui.hpp - opencv2/highgui.hpp: No such file or directory.
What should I do?
Thank you all!
EDIT
I opened: "/opencv/build/include/opencv2/highgui/highgui.hpp" and I can see that it includes this path "opencv2/highgui.hpp". If I change it to "../highgui.hpp" it works but I get other errors like this for other files... What should I do?
The problem is that you are not supposed to create your "cpp" file in the OpenCV "include" directory. You need to create it in a separate directory and then add OpenCV "include" as additional include directory for the compilation step.
The way to achieve this depends on your C++ development environment. If you are using Visual Studio, then you need to open project property pages, go to "C/C++ -> General" and add the path to OpenCV "include" directory to "Additional Include Directories". In case of some other compiler/IDE, you can find out how to do this by reading the corresponding documentation.

Why doesn't Xcode6 see included header files

I'm trying to build opencv2 as a universal framework. I am systematically removing the files/folders that I do not need. But I am running into this issue where the include files are not found. See the image below:
The following image clearly shows that the file is indeed there.
One of the contractors working with us said he had put the include files into the same directory as the source files and rename them according to their file structure but using "." instead of "/" as shown below:
But that means that I must go through all of the files that include files and change the include statement to use "." instead of "/". REALLY?
Is this true? Or do we have a configuration set wrong?
You need to setup search paths for your target in Build Settings->Search Paths->Header search paths.

Trying to include a file in subdirectory with codeblocks

I am trying to #include "physics/everything.hpp" in one of my project files, however I get the error: "No such file or directory"
I am using codeblocks, and that directory definitely exists, because it is shown in the left hand project browser pane.
Any ideas?
Use Settings -> Compiler & Debugger Settings -> Search Directories to add root of your project to include dirs. You should do it to be able to include files not by relative paths but by relative to project root.
Apologies everyone: I should have done this:
#include "./../physics/everything.hpp"
The file doing the including was in a sub-directory itself... (Rookie error)

xcode includes of header files

I am trying to compile a sample project for a browser plugin (http://pushingtheweb.com/2010/06/boilerplate-for-a-npapi-plugin/) using xcode 3.2.6 on Snow Leopard.
I have never used xcode before.
When I try to build I get an error with an include (AE/AERegistry.h: No such file or directory)
When I click on the file it takes me to the header file AE.h (which is in folder /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/Headers) and has the lines:
ifndef __AEREGISTRY__
include <AE/AERegistry.h>
endif
Firstly I dont know how to find out why AE.h is included in the build as I cant see it "included" anywhere.
Secondly why cant it find AERegistry.h which is in four separate locations on the computer?
I manually added one of the folders to the Header paths but it made no difference.
Why is it AE/AEReistry when it is not in a folder AE?
Thanks for any help
George
You'll have to go into the build settings, find "compiler flags"(CFLAGS), and add something like:
-I/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/Headers
And then do:
#include <AERegistry.h>

XCode 4 Relative #include paths in search?

I'm trying to port over a project I initially wrote in Windows to OS X and am having some difficulty with the header search paths.
I've used user search paths to include by source folder "project/src/core/"
Under core, I have, for example:
"projects/src/core/sys/sys_sdl.h"
which tries to include
"projects/src/core/render/opengl_render.h"
with the directive:
#include "render/opengl_render.h"
I've tried tons of different options, but I can't get seem to get Xcode to find the file unless I change it to "../render/opengl_render.h"
Is there something I'm missing here in the settings to get it to recognize relative paths to the header search paths?
Did you try setting the User Header Search Path to $SRCROOT/..? $SRCROOT is the directory that contains the target's source files, so $SRCROOT/.. should be the directory above that, which I think is what you want.
A related question (How do I print a list of "Build Settings" in Xcode project?) shows a useful command that makes it easy to see all the build settings and the variables they modify:
$ xcodebuild -project myProj.xcodeproj -target "myTarg" -showBuildSettings