LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 03-02-2015, 03:56 AM   #1
shailesh012
LQ Newbie
 
Registered: Mar 2015
Posts: 1

Rep: Reputation: Disabled
Header file for C


How to create a header file for C...
Let us say I want to create a.h
I have created but how to move it to directory /usr/include
I am not able to save any file in to directory /usr/include

Last edited by shailesh012; 03-02-2015 at 03:58 AM.
 
Old 03-02-2015, 04:43 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 8,503

Rep: Reputation: 2433Reputation: 2433Reputation: 2433Reputation: 2433Reputation: 2433Reputation: 2433Reputation: 2433Reputation: 2433Reputation: 2433Reputation: 2433Reputation: 2433
you should not do that. Why do yo need that?
 
Old 03-02-2015, 06:00 AM   #3
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,654

Rep: Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255
Quote:
Originally Posted by shailesh012 View Post
How to create a header file for C...
Let us say I want to create a.h
I have created but how to move it to directory /usr/include
I am not able to save any file in to directory /usr/include
Why?

Normally, system provided shared API definitions are in /usr/include, and are referenced by "#include <name>" lines. If you are including an application API then you use '#include "name"' lines. Note the <> for system defined ones and "" for local application ones.

In addition, there is the -I option that tells the compiler where to look for includes that are not in the system provided ones.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Header file in C tushar_pandey Programming 8 08-01-2012 12:47 AM
How to check missing header files included from another header file adisan82 Linux - Software 1 01-28-2011 04:57 AM
header file saadiaomar Programming 4 03-23-2006 05:18 PM
header file problems in g++ crash_override_me Programming 5 10-07-2005 02:28 AM
Create header file for existing .c file hk_michael Programming 5 02-25-2005 06:26 PM


All times are GMT -5. The time now is 05:29 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration