LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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, 02: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 02:58 AM.
 
Old 03-02-2015, 03:43 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,840

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

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:17 AM.

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