• 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
Compile problems when multiple headers in project have same name
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Compile problems when multiple headers in project have same name


  • Subject: Compile problems when multiple headers in project have same name
  • From: Mark Rowe <email@hidden>
  • Date: Mon, 19 Apr 2004 18:42:00 +1200

Hi,

I have a project which consists of source files in several directories. In particular, the root directory contains a file named Defines.h. Many files within the project include it by using the following syntax:
#include "Defines.h"


In a subdirectory, Foo, there is another file named Defines.h. Files within the Foo directory include Foo/Defines.h by saying:
#include "Foo/Defines.h"


The problem is that GCC appears to be including the wrong Defines.h in the second case. Instead of including Foo/Defines.h, it is including the project root directory's Defines.h. After playing with build settings for a while, I noticed that removing the "-Wp,-header-mapfile,/.../" portion of the compilation command line solves the problem.

My questions are as follows:
* Am I doing something wrong?
* What can I do to make things work the way that I expect?

Thanks in advance,

Mark Rowe
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • FAQ: Compile problems when multiple headers in project have same name
      • From: Chris Espinosa <email@hidden>
    • Re: Compile problems when multiple headers in project have same name
      • From: Marshall Clow <email@hidden>
  • Prev by Date: Java Applets
  • Next by Date: XCode Debugger has general problems
  • Previous by thread: Java Applets
  • Next by thread: Re: Compile problems when multiple headers in project have same name
  • Index(es):
    • Date
    • Thread