Jump to content

Talk:Static library

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Splitting

[edit]

Information about static libraries and specific implementations should be separated from library (computer science) and integrated into this article. --Jsmethers 02:34, 6 December 2005 (UTC)[reply]

yup. computer science and computer programming are not the same thing. there's no science to this concept whatsoever. 128.128.98.46 (talk) 21:41, 12 May 2008 (UTC)[reply]

Suggestion

[edit]

I came here to find out why one might use static linking instead of dynamic linking. Perhaps a section on that, in either the main library article or in this static library article? --maru (talk) Contribs 21:35, 3 January 2006 (UTC)[reply]

Since "dependency hell" is not specific to Windows but any system which uses dynamic libraries without enforced versioning, why the specific reference? Let's get rid of it. 63.241.31.130 (talk) 23:41, 5 February 2008 (UTC)[reply]
Well, that's a good point, but off the top of my head, Windows is the only major modern OS I can think of which doesn't use library versioning. It would be nice to give readers examples of the OSes affected by "dependency hell". Indeterminate (talk) 04:36, 8 February 2008 (UTC)[reply]
The reference to "DLL hell" is certainly not NPOV.149.142.46.100 (talk) 18:39, 25 April 2008 (UTC)[reply]
I reworded it. Let me know if it's still a problem. :) Indeterminate (talk) 11:30, 3 May 2008 (UTC)[reply]
try this. 128.128.98.46 (talk) 21:42, 12 May 2008 (UTC)[reply]

Performance

[edit]

"Usually, static linking will result in a significant performance improvement." This is wrong AFAIK. Might be true if every cycle counts, but 99.9% of the time, static linking should have no impact on performance. I could not find an article to support this, though. Only some forum posts and stackoverflow, so i don't dare to delete this section yet although i am positive it's wrong. -r — Preceding unsigned comment added by 79.194.66.178 (talk) 12:38, 7 April 2013 (UTC)[reply]

Question

[edit]

"The source code must not have a main function". I know of at least one static library (on windows) that does provide a main function. I cannot see why having main() as part of a library instead of in the compiled source would be a problem. Are we sure this is accurate? —Preceding unsigned comment added by 86.43.200.239 (talk) 21:26, 12 December 2007 (UTC)[reply]

No, it was incorrect, I have fixed it. -- intgr [talk] 23:10, 12 December 2007 (UTC)[reply]

Rename to "static linking"?

[edit]

Currently the "static linking" article redirects here. However, I think that this article should be moved there instead. This might sound like nitpicking, but I'm just trying to get other peoples' input before doing something that others would disagree with.

Anyway: I think Static linking is a bigger concept than static libraries, because the word "library" artificially limits it from applying to executable binaries, e.g. linking together static libraries into a unified binary. E.g., the phrase "static linking" would embrace the term "statically linked executable", but "static library" doesn't. -- intgr [talk] 15:55, 11 September 2007 (UTC)[reply]

.lib and .a

[edit]

What is the difference between .lib and .a? Thanks, --Abdull (talk) 12:26, 21 January 2010 (UTC)[reply]

The .lib extension is mainly used on Windows whereas .a is used on Unices. They are different file formats. -- intgr [talk] 19:41, 21 January 2010 (UTC)[reply]
Thank you for the quick answer! --Abdull (talk) 17:37, 30 January 2010 (UTC)[reply]

External function?

[edit]
"[...] [A] static library or statically-linked library is a set of routines, external functions and variables [...]"

Can someone define what an external function is, possibly with respect to "non-external" functions? Cheers, --Abdull (talk) 17:37, 30 January 2010 (UTC)[reply]

Caller

[edit]

What is a "caller"? Please define terms used or give a link to their definition. - KitchM (talk) 04:16, 4 March 2010 (UTC)[reply]

Static linking is not tied to compile time or to executables

[edit]

There may be compilers that do linking, or call linkers, but there are other compilers that do not. Also, the output of a linker need not be an executable, but may itself be a member of a static link library. Both of these are common in the mainframe world. Shmuel (Seymour J.) Metz Username:Chatul (talk) 20:48, 12 July 2010 (UTC)[reply]

Trolling for The C Book?

[edit]

I find it somewhat odd that chapters of The C Book at http://publications.gbdirect.co.uk/c_book/ appear as articles herein. I searched for "publications.gbdirect.co.uk" in response to another site that appeared to be a programming tutorial, but a quick glance at the source code revealed that if you remove references to that URI, you get a blank page.

"Pointer (computing)", "Declaration (computer programming)", "Command-line argument parsing", "Bit field", "C (programming language)" in addition to "Static library" — Preceding unsigned comment added by 70.171.205.211 (talk) 18:07, 17 June 2011 (UTC)[reply]

Advantage/Disadvantage

[edit]

Is it an advantage (or disadvantage, depending on how you look at it) that you can use a library to distribute code while concealing how you've implemented it? i.e. it is closed source code? Dohzer (talk) 11:16, 18 March 2015 (UTC)[reply]

That's a question about binary libraries in general, not specifically about static libraries, so it would belong in Talk:Library (computing). And binary libraries can be built and distributed from open source code. Guy Harris (talk) 23:01, 19 March 2023 (UTC)[reply]

"Historically, libraries could only be static"

[edit]

I guess one can find a point in time when there were only static libraries. Or no libraries at all. Or no computers at all.

However, this sentence in this context sounds like Unix/minicomputer bias, while ignoring everything else.

OS360 had the LOAD mechanism back in 1960s. In fact, it was used as a way to save then-limited memory: constantly LOAD modules before calling then and DELETE them immediately after.

So it's not something new and shiny, only available in recent version of Linux (or Windows) but rather a pretty ancient thing. — Preceding unsigned comment added by 31.151.194.40 (talk) 23:28, 13 June 2022 (UTC)[reply]