Advantage of DLL over exe

what is the advantage of the DLL over exe?
DLL and exe are completely different things.
An 'exe' is a program which runs on its own ( it may be using some DLLs )
a 'DLL' is a library linked at run time
closed account (S6k9GNh0)
An EXE and DLL are rather similar. However, Windows deals with both differently and they both have different uses. If you mean, "Should I link statically or dynamically", I don't know on Windows. I hate to link dynamically because you end up with the same DLL in 40 different locations on Windows but you end up with large and bulky executable if you link statically which is a pain in the ass to update. That's why Linux is easier on the soul :D.
Last edited on
That's why Linux is easier on the soul :D
why? what's the equivalent of DLL in linux?
To over obfuscate, DLL's can be thought of like header files. They are not executable on their own like an EXE is, but rather they are a collection of common commands\functions\etc... that programs can access from a shared memory space. The differance between a .h and a .dll is that .dll's are generally loaded once into memory by the OS and shared among applications regardless of association with one and other as opposed to .h's being compiled into the .exe.
A dll means you can share the same code between different programs. Which may or may not be important to you. Here are reasons why you might choose to use a DLL.

(1) If you are a software supplier and don't want to give away the source code. You can sell the code as a DLL. (COM/ActiveX etc.. are actually DLLs)
(2) Programs can share the same DLL, if you find a bug in the DLL you can deploy a new DLL once. Otherwise you would need to relink every program.

Reasons why not to use DLLs

(1) Someone deploys a new version of a DLL and your program(s) stops working.
(2) DLLs share the same memory space as the program. If the program is heavy on memory, it _may_ be better to have exes talking over IPC.
excuse me for this is off topic. i just want to share the answer i found.

That's why Linux is easier on the soul :D

why? what's the equivalent of DLL in linux

answer:
http://www.linuxforums.org/forum/coffee-lounge/37811-does-linux-use-dlls.html
I hate to link dynamically because you end up with the same DLL in 40 different locations
Sounds like someone doesn't know about PATH.

That's why Linux is easier on the soul
Sounds like someone doesn't know about dependencies and binary compatibility (or rather, lack thereof).

I will admit, though, that the fact that shared objects can be used by all processes is pretty nifty.
Sounds like someone doesn't know about PATH.
lol, i agree.

why would someone make 40 copies of a DLL? lol
Sounds like DLL hell.
Sounds like someone doesn't know about PATH.


Microsoft had to create side by side assemblies because people couldn't figure it out...
Sounds like DLL hell.
I do think a software distribution should include all its dependencies (or at least as many as is reasonably possible) to avoid that and other situations, which mind you, can be done on Windows.
But if you're a programmer and you have several programs that make use of the same library -- nothing out of the ordinary, really -- there's no reason not to keep a single copy in a directory in PATH.
I almost agree with you helios, I would like if this were the differance between a 'Full' installation and a 'Typical' installation. The Typical assuming that the common Windows DLL's the end user has are compatible and the Full installation Loading the known good DLL's into a seperate directory and explicitly telling the program to use those. But instead the only differance today is that a Full installation gives me crap like Clippy.
closed account (S6k9GNh0)
I just figured the layout of the Linux operating system with shared libraries was a little bit more organized. Wasn't starting a revelation... If you really want, I'll even erase the comment. :O
Last edited on
Topic archived. No new replies allowed.