DLLs and EXEs

Started by
3 comments, last by Evil Steve 17 years, 11 months ago
If my program is dependent upon a DLL, isn't there a way I can merge the DLL into my EXE when compiling/linking?
Advertisement
Yes. You can include the dll as a resource the exe - but to use the dll you have to include code to extract that resource and then dynamically load the dll. This is a lot of work and isn't generally warranted.

If you have the code for the dll, simply add it to your project.

What exactly is it that you're thinking about doing?


"I thought what I'd do was, I'd pretend I was one of those deaf-mutes." - the Laughing Man
Quote:Original post by Grantyt3
If my program is dependent upon a DLL, isn't there a way I can merge the DLL into my EXE when compiling/linking?


Can't you just use static libs?
I don't know, it's for SDL.
No. The first D in DLL stands for "Dynamic"; Implying that you can't do things statically.

There's 2 says fo compiling some external code into your program; by linking it statically (with a .lib), and having everything in the EXE, or by having a DLL, and having some of the code in that.

As LessBread said, it is possible to have the DLL loaded into the EXE, but it makes an absolute mess, is definitely not recommeded, and is a nightmare to implement.

This topic is closed to new replies.

Advertisement