• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Header path problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Header path problem


  • Subject: Header path problem
  • From: George Lawrence Storm <email@hidden>
  • Date: Wed, 21 Feb 2007 12:08:55 -0800

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


  • Follow-Ups:
    • Re: Header path problem
      • From: Mike Bellerby <email@hidden>
  • Prev by Date: Re: What are your top desired improvements in Xcode ?
  • Next by Date: How are you supporting pre-10.4?
  • Previous by thread: import an eclipse project
  • Next by thread: Re: Header path problem
  • Index(es):
    • Date
    • Thread