Reputation: 3474
Concerning Dll linkage, are static and implicit linking the same thing?
I understand the difference between implicit and explicit linking, and I think static is synonymous with implicit, but am not certain.
if they are indeed different, what is the difference between them, and how do I specify which one I want?
this link from msft uses the term "implicit" for what I've heard referred to as "static". Is it perhaps a msft-specific thing?
Upvotes: 4
Views: 1768
Reputation: 612784
Yes, in Windows-land, when discussing linking to DLLs, the terms static linking and implicit linking are synonymous.
The Visual Studio documentation calls this out:
Implicit linking is sometimes referred to as static load or load-time dynamic linking. Explicit linking is sometimes referred to as dynamic load or run-time dynamic linking.
In days gone by Microsoft preferred the terms implicit and explicit linking. Nowadays they seem to prefer the terms load-time and run-time, respectively. All the same, when people talk about linking to DLLs, the term static means is synonymous with implicit and load-time.
I for one try to avoid using static in relation to DLL linking for a couple of reasons:
Upvotes: 4
Reputation: 2569
Implicit linking could be done with static (.a) or dynamic libraries (.so, .dll). When you compile a program with link to the library, it's an implicit linking. It's faster thant an explicit linking.
An explicit linking is when you use dlopen
with dynamic libraries (.so, .dll). You don't compile the program with the link to the library, but you use dlopen
to open the file, and you extract the functions you need.
Upvotes: 2