Re: Header path problem
Re: Header path problem
- Subject: Re: Header path problem
- From: Mike Bellerby <email@hidden>
- Date: Thu, 22 Feb 2007 17:43:10 +0000
Hi George
I notice that your lost header is directly after you include
"string.h". Xcode does really nasty things with header search paths
and breaks C++ rules.
Try removing or changing the string.h include.
Hopes this helps
Mike
On 21 Feb 2007, at 20:08, George Lawrence Storm wrote:
I am having a problem the C++ compiler not being able to find some
of my header files (Xcode 2.4.1).
The absolute paths are as follows:
/Users/Me/Desktop/Projects/MyProject/build/macosx/testrunner/
testrunner.xcodeproj
/Users/Me/Desktop/Projects/MyProject/include/LostHeader.h
/Users/Me/Desktop/Projects/MyProject/test/unit/FileBeingCompiled.cpp
My includes are:
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/TestCase.h>
#include <iostream>
#include <fstream>
#include "string.h"
#include "LostHeader.h"
In my Project Info I have set my Header Search Paths to:
(non-recursive) "$(SRCROOT)/../../../test/unit"
(non-recursive) ../../../import/cppunit/macosx/DebugDynamic/include/
cppunit
One strange thing, I can open and close the Project Info and there
is no change, however if I close the project and reopen it the
first Header Search Path changes to:
$(HEADER_SEARCH_PATHS_Quoted_1)
It is finding my cppunit headers and my system headers but not my
"LostHeader.h".
A little more background: this problem surfaced when I started to
experiment with unit testing (cppunit). In my first attempt I tried
to add unit tests to an existing project as a separate target. When
I did the compiler found my original files with no problem, however
it could not find my cppunit headers. As an experiment I wrote the
headers with the absolute path and the compiler did find them, but
I could not find any setting in the Header Search Paths which would
allow the compiler to find them when attempting to find them
relative to the project file.
I have started with a new Command Line Utility C++ Tool added the
Framework generated by my first project and added my unit test files.
The only item in my file being compiled which is slightly unusual
is that part of the path to the cppunit is part of my include:
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/TestCase.h>
however I do have an existing file in a different project with the
same includes which works with no problems.
Suggestions?
- George Lawrence Storm, DivX, Inc.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden