Solved

tell me

Posted on 2001-06-13
6
195 Views
Last Modified: 2010-04-02
diff between library & header files?
0
Comment
Question by:shoaib_adil
6 Comments
 
LVL 2

Accepted Solution

by:
MadYugoslav earned 50 total points
Comment Utility
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
 
LVL 5

Expert Comment

by:djbusychild
Comment Utility
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
 
LVL 30

Expert Comment

by:Axter
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 1

Expert Comment

by:scientist060700
Comment Utility
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
 
LVL 11

Expert Comment

by:griessh
Comment Utility
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
 
LVL 5

Expert Comment

by:Netminder
Comment Utility
Per recommendation comment force/accepted by

Netminder
Community Support Moderator
Experts Exchange
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now