Under Linux with gcc you will see two kind of files the archives *.a
(used to provide a set of functions to link in statically) and *.so
, so called shared object library (to link dynamically). Their equivalent under windows for most compilers are *.lib
and *.dll
.
So *.a
and *.dll
are not interchangeable at all. Moreover you have under windows the dilemma that a *.lib
can be used for both linking statically and dynamically (with fixed addresses). Another way is to bind fully dynamically with GetProcAddress
but that has to overhead of creating a wrapper, might be what you need if you want to make the dlls work for different versions.
You may recognize the static libs at their size, they are huge in comparison to the libs used to link dynamically. In my projects I really often go the way with GetProcAddress
as I like the ability to just drop in the fresh new DLLs for older applications without linking everything again.