Jump to content
  • Advertisement
Sign in to follow this  
Grantyt3

DLLs and EXEs

This topic is 4418 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

If my program is dependent upon a DLL, isn't there a way I can merge the DLL into my EXE when compiling/linking?

Share this post


Link to post
Share on other sites
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?


Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!