954,505 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

static and shared library

hi,

what is the difference between static and shared library how do we create them and what is the extension used for both of

srinath.sec
Newbie Poster
7 posts since Apr 2007
Reputation Points: 10
Solved Threads: 0
 

Every different program that uses a static library has its own copy of the library built in. A shared library only has one copy and every program that uses it just references that copy. How you create them depends on the tool you're using, and how they're named depends on the platform. For example, on Windows it might be *.lib versus *.dll. On Linux it might be *.a versus *.so.

Narue
Bad Cop
Administrator
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
 

And it gets a little more complicated because there are *nix compilers that have been ported to MS-Windows os, and consequently still use *.a library extensions. Dev-C++ is one such compiler. So for libraries the extension depends on the compiler.

Ancient Dragon
Retired & Loving It
Team Colleague
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
 

Not that it matters too much. I think that .lib files are the same format as .a files these days.

dwks
Posting Whiz in Training
269 posts since Nov 2005
Reputation Points: 185
Solved Threads: 28
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You