Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between *.a and *.dll on Windows

Tags:

assemblies

What is the difference between *.a and *.dll on Windows? From what I understand one can package all the *.o files into a *.a, which is a distributable that other application can use, on Linux.

But what are the difference between *.a and *.dll? Are they interchangeable? If my application needs to link to *.a, can I link it to *.dll as a substitute?

like image 483
Graviton Avatar asked Jan 26 '10 10:01

Graviton


1 Answers

Aside: There is no defined *.a format with plain Windows development tools, unless you use a Linux-based tool chain. You're presumably referring to a static library, aka .lib in Windows.

A DLL is the equivalent of a shared library (*.so) on Unix and no, you normally can't link to a shared library/dll if the linker expects you to link against a static library.

like image 178
Timo Geusch Avatar answered Sep 30 '22 16:09

Timo Geusch