C Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesC Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 24th, 2002, 06:02 PM
.shapeShifter's Avatar
.shapeShifter .shapeShifter is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: germany
Posts: 39 .shapeShifter User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 m 43 sec
Reputation Power: 7
Question c++ - possible to set an include path?

hi all

newbie question:

is it possible to set an include path? and then every include like #include "something.h" will look for the file in /path/to/includepath/

pls dont kick me *g*
thx for any answers
__________________
greetings
.shapeShifter

Reply With Quote
  #2  
Old July 24th, 2002, 06:22 PM
Scorpions4ever's Avatar
Scorpions4ever Scorpions4ever is offline
Banned ;)
Dev Shed God 5th Plane (7000 - 7499 posts)
 
Join Date: Nov 2001
Location: Glendale, Los Angeles County, California, USA
Posts: 7,495 Scorpions4ever User rank is Lieutenant General (80000 - 90000 Reputation Level)Scorpions4ever User rank is Lieutenant General (80000 - 90000 Reputation Level)Scorpions4ever User rank is Lieutenant General (80000 - 90000 Reputation Level)Scorpions4ever User rank is Lieutenant General (80000 - 90000 Reputation Level)Scorpions4ever User rank is Lieutenant General (80000 - 90000 Reputation Level)Scorpions4ever User rank is Lieutenant General (80000 - 90000 Reputation Level)Scorpions4ever User rank is Lieutenant General (80000 - 90000 Reputation Level)Scorpions4ever User rank is Lieutenant General (80000 - 90000 Reputation Level)Scorpions4ever User rank is Lieutenant General (80000 - 90000 Reputation Level)Scorpions4ever User rank is Lieutenant General (80000 - 90000 Reputation Level)Scorpions4ever User rank is Lieutenant General (80000 - 90000 Reputation Level)Scorpions4ever User rank is Lieutenant General (80000 - 90000 Reputation Level)Scorpions4ever User rank is Lieutenant General (80000 - 90000 Reputation Level)Scorpions4ever User rank is Lieutenant General (80000 - 90000 Reputation Level)Scorpions4ever User rank is Lieutenant General (80000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 18 h 39 m 19 sec
Reputation Power: 857
Yes, it is possible to do so. Depending on your environment (Visual C++, Borland C++ Builder or good ol' command line g++)this is done differently.

For C++ Builder:
Go to Project-->Options. In the dialog box, click on Directories/Conditionals tab and add the directories to the Include Paths.

For Visual C++:
Go to Tools-->Options. In the dialog box, click on the Directories tab. There's a list box that shows the current list of search directories. It's not very obvious here, but if you double click on the dotted box below the last directory, it lets you add directories. (WARNING: This will be permanently set for all projects hereafter).

If you wish to set the path temporarily for one project alone, go to Project-->Settings. In the dialog box, select the C/C++ tab. In the category combo-box, select "Preprocessor" and enter the path to additional include directories in the text box labelled as such.

For g++, c++, cc or gcc:
On the command line, use -I<pathname>. For example you could typically do something like this:
g++ -I/path/to/foo rest_of_options...

Hope this helps

Reply With Quote
  #3  
Old July 24th, 2002, 06:41 PM
.shapeShifter's Avatar
.shapeShifter .shapeShifter is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: germany
Posts: 39 .shapeShifter User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 m 43 sec
Reputation Power: 7
thx, that works.

im using gcc for the first steps

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesC Programming > c++ - possible to set an include path?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway