• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 205
  • Last Modified:

tell me

diff between library & header files?
0
shoaib_adil
Asked:
shoaib_adil
1 Solution
 
MadYugoslavCommented:
Header files are source files with declarations of identifiers.
Library files are files with implementation (definition) of previously declared identifiers.
Identifiers are types (classes with attributes and methods), variables and functions.
0
 
djbusychildCommented:
header files are included when you compile your code
library files are binary data that gets linked after your code is compiled.

often times an API or an SDK will release a compiled
library and an accompanying header file. This way you can refer to functions that have their prototypes defined in the header file.
0
 
AxterCommented:
While everyone can agree what header files are, the same can?t be said for library files.

In general, library files include header files.

In other words, header files have your declarations, and library files includes implementation and declaration.
The implementation can be precompiled code, fully compiled code, or code that has not been compiled.
Example of precompiled code would be *.lib, *.obj, *.o, and *.a files.
Example of compiled code would be (Win)*.DLL and (Unix)*.so files.

No matter what type of implementation code you?re using, you always need to use their associated header files in order to use the implementation code.

So the entire package is the library, and the header files are just one part of the library.

There are some exceptions to the above.  For example, you can have your implementation code in the header file.  In which case the header files would be the library as well as the header.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
scientist060700Commented:
Library is the collection of many headerfiles and many other useful files and information that you can call and include in your program.
header files are the files created that you may call in your programm to do specific operations although they are not required to call anymore you can do without header files.
0
 
griesshCommented:
I think you forgot this question. I will ask Community Support to close it unless you finalize it within 7 days. Unless there is objection or further activity,  I will suggest to accept "MadYugoslav" comment(s) as an answer.

If you think your question was not answered at all, you can post a request in Community support (please include this link) to refund your points.
The link to the Community Support area is: http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
======
Werner
0
 
NetminderCommented:
Per recommendation comment force/accepted by

Netminder
Community Support Moderator
Experts Exchange
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now