Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 23 Oct 2014, 05:30
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
headers file or not to header file
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [3 Posts]  
Author Message
scsijon

Joined: 23 May 2007
Posts: 1047
Location: the australian mallee

PostPosted: Fri 12 Jul 2013, 20:07    Post subject:  headers file or not to header file  

I'm putting this here as I suspect i'll get a better answer.

Should every application have header files?

When is a header file unnecessary?

Is there a way to build only the header files if they but not the actual package is needed?

thanks
scsijon
Back to top
View user's profile Send private message Visit poster's website 
Ibidem

Joined: 25 May 2010
Posts: 501
Location: State of Jefferson

PostPosted: Sat 13 Jul 2013, 04:06    Post subject: Re: headers file or not to header file  

scsijon wrote:
I'm putting this here as I suspect i'll get a better answer.

Should every application have header files?

When is a header file unnecessary?

Is there a way to build only the header files if they but not the actual package is needed?

thanks
scsijon

1) No applications except those supporting plugins, and libraries.
Also protocols may justify headers without libraries.
Static libs always need headers.

2) When the binary does not meet the criteria in section 1, or when the target is not intended to be used for development.
Dynamic libs may be used solely for dependencies; in this case, it makes sense to distribute just the binaries.
When cross-compiling, it's ~ "any time you aren't trying to bootstrap a new self-hosting system".

3) Not for most packages. But many provide headers that don't need any "building".
Back to top
View user's profile Send private message 
ericsond

Joined: 13 Apr 2013
Posts: 5

PostPosted: Wed 24 Jul 2013, 20:38    Post subject:  

Perhaps I am misunderstanding your question, i am also assuming you are referring to C.

The use of header files jives with C's modular approach. If you only have one file for source code, then certainly you don't need a header file, but assuming you want to modularize your code into functions, then you would want to keep these sections apart by using different C files and different header files.

You might want to look at what 'scope' means to a source files to gain a better understanding of modular functionality.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [3 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0474s ][ Queries: 12 (0.0080s) ][ GZIP on ]