|
-
February 12th, 2008, 03:12 AM
#1
Stand alone exe does not run in other computer
I've created a program using MinGW 5.1.3, Eclipse C++ 3.3.1.1, Qt Open Source 4.3.3 and Qt Eclipse Integration 0.0.7. The OS is Windows XP. The project is a Qt GUI Project. After making the release version, I tried to run in a different Windows 2000/XP machine where none of the mentioned softwares are installed. The program didn't run mentioning that mingwm10.dll (or some other mingw related dll) file is not found and advices to reinstall the application. I want to make such an executable which will run on any 2000/XP machine without the help of the additional softwares/dlls. How can I do that in Eclipse?
Thanks in advance.
~Donotalo()
-
February 12th, 2008, 07:11 AM
#2
Re: Stand alone exe does not run in other computer
You would have to write your code so as not to use external libraries, which is probably too hard and pointless. I suggest you just package the executable with the required DLLs which will make it work fine.
-
February 12th, 2008, 09:10 AM
#3
Re: Stand alone exe does not run in other computer
Consider downloading a free utility like Dependency Walker which will scan any 32-bit or 64-bit Windows module (exe, dll, ocx, sys, etc.) and builds a hierarchical tree diagram of all dependent modules.
http://www.dependencywalker.com/
Use it to know which files you should include in your installation package or use the result to decide which files you might be able to dismiss from your project.
Regards
Doron Moraz
-
February 12th, 2008, 12:28 PM
#4
Re: Stand alone exe does not run in other computer
Thanks for the replies. Dependency Walker is indeed a great tool! Thanks Doron Moraz for that. Using Dependency Walker I find a horrible thing: the Qt application also needs QtCore4.dll and QtGui4.dll together having size 10.7 MB where my application is 291 KB. I don't like the idea to bear megabytes of dlls for application of much less size. I want to lean how can I embed somehow those dlls into the application executable file. Can anyone help me?
Thanks.
~Donotalo()
-
February 12th, 2008, 12:41 PM
#5
Re: Stand alone exe does not run in other computer
The entire point of DLLs is to avoid such embedding, on the theory that it's better for shared code to be large and custom code to be small.
If you could find a version of QT which offered static libraries only, you could link them directly into your program and not need the DLLs. However, then your program might be 10+Mb instead.
If you only use a small portion of the functionality available in a static library, some compilers are good enough to throw away the rest. In this case, using a DLL may seem inefficient.
However, if you have 20 programs which each use 1/10th the resources available in a library, then it's suddenly better to use one DLL rather than linking all 20 statically.
Last edited by Lindley; February 12th, 2008 at 12:51 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|