Click here to Skip to main content
13,094,001 members (58,595 online)
Rate this:
Please Sign up or sign in to vote.
hi every body
that is improve
i have a exe program that use 4 dll
and i wanna to bint this exe and dlls together...or combine
now is clear??
Posted 29-Oct-12 0:23am
Updated 29-Oct-12 0:30am
OriginalGriff 29-Oct-12 6:26am
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind.
Use the "Improve question" widget to edit your question and provide better information.
pasztorpisti 29-Oct-12 7:09am
In C++ I would go by converting the dynamic link libraries (DLLs) into static libs. That way those library projects are linked statically into your exe (just like other object files of your exe code).
rpm3d 29-Oct-12 7:13am
i know pasztorpisti ...but i use of qt and that dlls very hard for me with statics
aspnet_regiis -i 29-Oct-12 7:18am
create a setup project
rpm3d 29-Oct-12 7:20am
i have to without setup
BillWoodruff 5-Jan-15 16:55pm
Have you considered putting the files in a folder and just zipping, or raring, the files into a compressed file ? So, so the user un-compresses the archive, and then runs the 'exe ? A poor-man's installer :)
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

The whole idea of DLL files is that you don't have to combine them together - they exist separately so they can be used by multiple applications without needing multiple copies.
The only way to combine and EXE with the DLL files would be to include the source of the DLLs in the EXE source, and rebuild the exe that way, so it no longer needs the external DLLs. From the huge selection of tags you gave this question, that is unlikely to work, as it would appear that your files are produced in a variety of languages - which will not compile together.
nv3 29-Oct-12 7:56am
Good answer. The funny thing is that it is theoretically possible to combine the code from multiple PE format Dlls and Exes into a single file. There is just no tool around to do that. At least there has never one come across my way so far. Apparently, nobody had any need for that so far.
Member 13342407 3-Aug-17 3:19am
Why did you close my solution? I spent hours creating a tool that solves the problem posted in the question. What are you implying? Please consider trying the tool before you just mark it with the reason "Content has been posted that is spam."! Your solution does not solve this question anyway.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

if all your dlls are .net assemblies then there is a simple alternative way
Merging .NET assemblies using ILMerge
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

There are two ways to use libraries in a C++ program (an exe):

1. You dynamically link them: in this case you have header files defining the API, *.lib files defining the entry points, and *.dll files, with the implementation of the library. In this case you add the path of the header files to your compiler's include-path, #include the headers where you need them in your code, and add the *.lib files to your linker's additional libraries (see your compiler/linker settings). The only thing you need to do with the *.dll files is see that they are either in the same directory as your exe, or they are in a directory that is in your search path (check the $PATH environment variable)

2. You statically link them: in this case you do not have *.dll files. Instead, either your *.lib files contain the implementation, or the implementation is provided in the form of either *.obj files, or as source code. Since there are so many possible ways to do this, there is usually documentation on how to set up your project to statically bind that library. However, if you have the implementation only in the form of *.dll files, then you can not statically bind that library to your program!

In any case, the exact things you must or can do depend on the files that you have, and the exact settings depend on the compiler/linker or IDE that you have. Without further information, we cannot help any more.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01 | 2.8.170813.1 | Last Updated 2 Aug 2017
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100