|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
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
|
|
#2
|
||||
|
||||
|
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 |
|
#3
|
||||
|
||||
|
thx, that works.
im using gcc for the first steps ![]() |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > C Programming > c++ - possible to set an include path? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|