C++ How to compile dll in a .exe

In order to achieve that you will need static linking. This requires that all your libraries (and the libraries they depend upon recursively) need to be available as static libraries. Be aware that the size of your executable will be large, as it will carry all the code from those static libraries. This is why shared libraries (DLLs) were invented in the first place, to be able to share common code among applications. However that does not always work so well on windows.

I think what you may really want is an installer that installs your executable and all it’s dependent libraries.

Leave a Comment