LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-05-2009, 05:10 PM   #1
sysbox
Member
 
Registered: Jul 2005
Posts: 117

Rep: Reputation: 15
What is my Include Path


I'm logging into a somewhat public RedHat system and I'm using tcsh as my default shell. I don't know what directories the local system admins added to my Include path.

When I compile a code, it finds Whatever.h, and I can't tell where it is coming from. How can I determine what the Include path is, and where it is set?
 
Old 10-05-2009, 05:42 PM   #2
lutusp
Member
 
Registered: Sep 2009
Distribution: Fedora
Posts: 835

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by sysbox View Post
I'm logging into a somewhat public RedHat system and I'm using tcsh as my default shell. I don't know what directories the local system admins added to my Include path.

When I compile a code, it finds Whatever.h, and I can't tell where it is coming from. How can I determine what the Include path is, and where it is set?
Code:
$ whereis Whatever.h
Also, set your own include path. Don't accept someone else's.
 
Old 10-05-2009, 05:53 PM   #3
sysbox
Member
 
Registered: Jul 2005
Posts: 117

Original Poster
Rep: Reputation: 15
That isn't working.

Code:
> whereis Whatever.h
Whatever:
>Also, set your own include path. Don't accept someone else's.

Okay. How do I determine what someone else's include path is, and how do I set my own include path?
 
Old 10-05-2009, 07:12 PM   #4
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,623

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
for starters
Code:
echo $PATH
and see what is in the normal system path
 
Old 10-06-2009, 01:01 PM   #5
sysbox
Member
 
Registered: Jul 2005
Posts: 117

Original Poster
Rep: Reputation: 15
I was able to accomplish this with the "whereis" command as lutusp recommended. Actually, that's useful for locating libraries too, which is another problem I've been looking to solve.

So, Thanks for all the help!
 
Old 10-06-2009, 01:47 PM   #6
lutusp
Member
 
Registered: Sep 2009
Distribution: Fedora
Posts: 835

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by sysbox View Post
That isn't working.

Code:
> whereis Whatever.h
Whatever:
But it was your hypothetical example! Replace "Whatever.h" (your example) with a real file name.
 
Old 10-06-2009, 02:01 PM   #7
sysbox
Member
 
Registered: Jul 2005
Posts: 117

Original Poster
Rep: Reputation: 15
Yes, I know that. I was using "whereis" on the real name of the include file I was looking for. The problem was that that include file didn't exist anywhere on my "Include Path", and I didn't know that. So, that's why the whereis output didn't help me much. Actually, it would be nice if whereis explicity stated that it couldn't find the file, but that's okay. Now I know.

Thanks again.
 
Old 10-06-2009, 06:01 PM   #8
lutusp
Member
 
Registered: Sep 2009
Distribution: Fedora
Posts: 835

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by sysbox View Post
Yes, I know that. I was using "whereis" on the real name of the include file I was looking for. The problem was that that include file didn't exist anywhere on my "Include Path", and I didn't know that. So, that's why the whereis output didn't help me much. Actually, it would be nice if whereis explicity stated that it couldn't find the file, but that's okay. Now I know.

Thanks again.
Okay, there's one more thing to try:

$ locate (filename)

If this fails, try this:

# updatedb (takes a while)

Then repeat the locate command.

If all this fails, you really don't have the target file.
 
  


Reply



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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to include the path of exe in the ld library path? malli42108 Linux - Networking 10 09-17-2009 09:21 AM
Include path in kdevelop t_t_h Programming 3 04-10-2006 01:08 PM
where did my include path go aot2002 Linux - Wireless Networking 2 01-24-2004 05:02 AM
Path to include? Mazen Alzogbi Red Hat 1 11-15-2003 06:25 AM
adding include path hfawzy Linux - Newbie 3 02-01-2003 07:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration