Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Is Shared Library same as DLL

mkhwang9
Beginner
401 Views

I wonder if Shared Library is exacltly same as DLL in terms of its function. In Windows system, DLL is loaded when I readlly need it. That is, it is not automatically loaded when calling program is started(invoked). Is it same with Shared Library ? Acutally, I made a small program which may call or may not call - depending on the flow logic- a subroutine that is made as shared library. I am not sure if the shared library is always loaded into memory or only loaded when it is initally called. Any comment would be very much appreciated.

Moonkyu

0 Kudos
1 Reply
Steven_L_Intel1
Employee
401 Views
In the Linux world, it's called a "shared object" (.so), but yes, it's very much like a DLL. Unlike a DLL, you can link directly to a .so and don't need a separate "export library".

However, even on Windows, a DLL is loaded automaticlaly when the program starts, whether or not you call any routines in it. The Microsoft linker does have a "delayed load" feature which you can enable, where a "stub" is linked in that dynamically loads the DLL when the routine is called. That behavior is not the default. I don't know if Linux has something similar.
0 Kudos
Reply