Jump to content
  • Advertisement
Sign in to follow this  
Shashwat Rohilla

Difference Library and API

This topic is 2565 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement

What is the difference between a Library and an API?
I read somewhere on the net that they can be used interchageably.

Please clear me with this..



A library is a group of compiled code ( functions, data ) organized into a single file. Generally with the extension .so, .a, .dll, .lib, etc.


An API ( Application Programming Interface ), is a group of methods, data, etc... that are exposed to programmers. The programming interface if you will. An API ( such as the Windows API ) can consist of many hundred libraries. Keep in mind, this isn't necisarrily a requirement to be an API, as an API could be exposed as a web service, or though other means.



And no, they are different things, although as in the above example, one can contain the other.

Share this post


Link to post
Share on other sites

What is the difference between a Library and an API?
I read somewhere on the net that they can be used interchageably.

Please clear me with this..



Library = collection of code. A library can range from a single pre-compiled file to a large collection of items.
API = Application Programming Interface. It generally means a library of code that acts as an interface to a system, such as the interface to your OS.
SDK = Software Development Kit. Generally refers to a collection of tools, software, documentation, and code that are used together.

Share this post


Link to post
Share on other sites
Adding to the above however, they do get used interchangeably often enough that you can't always rely on the "correct" term having been chosen in any particular case, and in some cases it can be difficult to pick which (if either) of the terms would be more appropriate. The above definitions are good and fairly widely accepted though.

Share this post


Link to post
Share on other sites
So an API is a set of libraries meant for a common purpose.

For example, OpenGL contains a set of libraries to do graphics programming.
Windows API is a set of libraries to perform operations on form applications.

Am I right?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!