Header FileS in Other Directories

Please support our C advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Jun 2005
Posts: 8
Reputation: rkarimi is an unknown quantity at this point 
Solved Threads: 0
rkarimi rkarimi is offline Offline
Newbie Poster

Header FileS in Other Directories

 
0
  #1
Jun 15th, 2005
I'm using a set of classes with lots of *.h files. These files are located in a separate directory & I do not want to copy them to my own folder. I can add the path of the *.h file I use in the #include. However if that *.h file refers to another *.h file then I must change lots of #include.

BTW, I prefer not to use a makefile & do something only within *.c & *.h files :cheesy:
Reply With Quote Quick reply to this message  
Join Date: Apr 2004
Posts: 4,461
Reputation: Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future 
Solved Threads: 254
Team Colleague
Dave Sinkula's Avatar
Dave Sinkula Dave Sinkula is offline Offline
long time no c

Re: Header FileS in Other Directories

 
0
  #2
Jun 15th, 2005
The best answer is to use a makefile/IDE. If you don't want to, yes, it is a lot of editing. That is precisely why you generally don't specify a path on the #include line and instead point the compiler at where to look.
"One of the methods used by statists to destroy capitalism consists in establishing controls that tie a given industry hand and foot, making it unable to solve its problems, then declaring that freedom has failed and stronger controls are necessary." --Ayn Rand
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 8
Reputation: rkarimi is an unknown quantity at this point 
Solved Threads: 0
rkarimi rkarimi is offline Offline
Newbie Poster

Re: Header FileS in Other Directories

 
0
  #3
Jun 15th, 2005
Originally Posted by Dave Sinkula
The best answer is to use a makefile/IDE. If you don't want to, yes, it is a lot of editing. That is precisely why you generally don't specify a path on the #include line and instead point the compiler at where to look.

OK, then How can I use makefile on MAC?
Reply With Quote Quick reply to this message  
Join Date: Apr 2004
Posts: 4,461
Reputation: Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future 
Solved Threads: 254
Team Colleague
Dave Sinkula's Avatar
Dave Sinkula Dave Sinkula is offline Offline
long time no c

Re: Header FileS in Other Directories

 
0
  #4
Jun 15th, 2005
Does your compiler have any documentation? If you let us know what compiler you have we can all Google for this information.
"One of the methods used by statists to destroy capitalism consists in establishing controls that tie a given industry hand and foot, making it unable to solve its problems, then declaring that freedom has failed and stronger controls are necessary." --Ayn Rand
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 1525 | Replies: 3
Thread Tools Search this Thread



Tag cloud for C
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC