Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++ Windows VB.NET QT QT-Creator , +
hi every body
ok
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 1:23am
rpm3d520
Edited 29-Oct-12 1:30am
v2
Comments
OriginalGriff at 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 at 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 at 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 at 29-Oct-12 7:18am
   
create a setup project
rpm3d at 29-Oct-12 7:20am
   
i have to without setup
Rate this: bad
good
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.
  Permalink  
Comments
nv3 at 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.
Rate this: bad
good
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
[^]
 
http://ilmergegui.codeplex.com/[^]
  Permalink  
Rate this: bad
good
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.
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 499
1 Maciej Los 325
2 Sergey Alexandrovich Kryukov 234
3 DamithSL 233
4 Mathew Soji 195
0 OriginalGriff 7,168
1 Sergey Alexandrovich Kryukov 6,377
2 DamithSL 5,461
3 Manas Bhardwaj 4,876
4 Maciej Los 4,450


Advertise | Privacy | Mobile
Web02 | 2.8.1411023.1 | Last Updated 13 Sep 2014
Copyright © CodeProject, 1999-2014
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