• 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
Re: Header Files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Header Files


  • Subject: Re: Header Files
  • From: koko <email@hidden>
  • Date: Tue, 30 Aug 2011 20:48:39 -0600

There is not a common parent directory so I did this:

in File1.cpp

#include "../PROJDIR/Folder A/Header.h"

and

In File2.cpp

#include "../PROJDIR/Folder B/Header.h"

So while Header.h is th esame name I get two different versions.

-koko



On Aug 30, 2011, at 7:49 PM, Conrad Shultz wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 8/30/11 6:07 PM, koko wrote:
>> Say I have two header files with the same name.  (Long story as to
>> why so let's get past that for now).
>>
>> I put them in folders:
>>
>> Folder A Folder B
>>
>> So I have
>>
>> Folder A Header.h Folder B Header.h
>>
>> How do I construct my #include to get the header I want included as
>> in:
>>
>> implem1.cpp #include Folder A/Header.h
>>
>> implem2.cpp #include Folder B/Header.h
>
> You can simply make the common parent directory part of your header
> search path then include the files just as you did (with appropriate
> quotation marks).
>
> (I just wrote a trivial little C++ program and compiled with g++ on
> the command line to verify.)
>
> - --
> Conrad Shultz
>
> Synthetiq Solutions
> www.synthetiqsolutions.com
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (Darwin)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iD8DBQFOXZM1aOlrz5+0JdURAhfEAJ9ZP/GTMcHmXZsY51uVx/s5nTN0nwCbBXZJ
> ufcR7zmJwHmsnxb+8rep/1A=
> =Vyhi
> -----END PGP SIGNATURE-----
>

 _______________________________________________
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 Files
      • From: Andreas Grosam <email@hidden>
References: 
 >Headrer Files (From: koko <email@hidden>)
 >Re: Header Files (From: Conrad Shultz <email@hidden>)

  • Prev by Date: Re: Header Files
  • Next by Date: Linking NSWindow via IB
  • Previous by thread: Re: Header Files
  • Next by thread: Re: Header Files
  • Index(es):
    • Date
    • Thread