Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
11-02-2007, 04:50 AM
|
#1
|
LQ Newbie
Registered: Nov 2006
Posts: 15
Rep:
|
setting more than one include location with export
hi
How can i set more than one location for include directory path
With export command
thanks
|
|
|
11-02-2007, 08:30 AM
|
#2
|
LQ Guru
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509
|
What do you mean exactly for "include directory path"? If you have to specify more than one directory in an environment variable, the common way is to separate items with a colon (as for the environment variable PATH). However it depends from which application will try to use that variable and if it can interpret multiple items this way. On the other hand, if you have to specify path to includes when compiling a source code, you can specify multiple -I options, e.g.
Code:
gcc -I/usr/include -I/my/include/dir source_code.c
|
|
|
11-02-2007, 08:35 AM
|
#3
|
LQ Newbie
Registered: Feb 2007
Location: Shanghai, China
Distribution: Fedora&&openSUSE&&Ubuntu
Posts: 13
Rep:
|
Suppose you want to add /home into PATH, use:
export PATH=$PATH:/home
|
|
|
11-02-2007, 09:10 AM
|
#4
|
LQ Guru
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298
Rep:
|
If you were referring to exporting environmental variables e.g. path, you can do
Code:
$export VARIABLE=$VARIABLE:/some/dir:/some/other/dir
Last edited by reddazz; 11-03-2007 at 06:18 AM.
|
|
|
11-02-2007, 09:44 AM
|
#5
|
LQ Guru
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509
|
Quote:
Originally Posted by reddazz
Code:
$export VARIABLE = $VARIABLE:/some/dir:/some/other/dir
|
This is a typo. I think you mean without spaces around the = sign.
|
|
|
11-03-2007, 06:18 AM
|
#6
|
LQ Guru
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298
Rep:
|
Quote:
Originally Posted by colucix
This is a typo. I think you mean without spaces around the = sign.
|
Thats correct. Thanks for spotting the error.
|
|
|
All times are GMT -5. The time now is 02:59 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|