wertyk
asked on
Make EXE not use DLL
I am writing a program using glut and I want to send it to a friend. If i just send the EXE, he gets an error message saying that "glut32.dll is not installed" but I dont want to have to send 2 files (the EXE and glut32.dll). How do I build the project so that glut32.dll is not required? Is there a way to do this?
ASKER
i dont really want to make an installer, i just want a standalone exe file that he can run
If you just want to send the .EXE file and not the dll file then there is no way he/she can run it without that dll which is used in your program. But I have one more solution: Ask him to download glut32.dll from the net and register it before running your EXE, by this way you have to send him just your EXE and he/she can also run your program.
:-))
CHEErs!
:-))
CHEErs!
ASKER
well i can just send him glut32.dll
but there is no way to like "include" in a way glut32.dll inside of the exe?
but there is no way to like "include" in a way glut32.dll inside of the exe?
ASKER
like kinda package them together or something like that?
you may try to package it into one winrar selfextract package and set the default running program to your exe file
make the project/ application as static.
ASKER
aravindtj-
how do i do that?
how do i do that?
ASKER
Ed-
yeah thats exactly what i want. now can you make it free?
yeah thats exactly what i want. now can you make it free?
If you have visual studio .net This is free
http://www.developerfusion.com/show/4504/
This one you can use but to compress files inside .exe you need to register.
http://www.pgware.com/downloads/?file=alloy.exe&type=trial
So this is the same as creating an installer pkg sizewise anyways.
Another not free but lower cost
http://www.softpedia.com/public/cat/5/2/5-2-19.shtml
Another not free but lower cost
http://www.moonlight-software.com/vbpower.htm
Another not free but lower cost
http://www.worldssp.net/software/VB-PowerWrap.htm
Looks like $49.95 minimun for VB : /
Free for .net
:)
-Ed
http://www.developerfusion.com/show/4504/
This one you can use but to compress files inside .exe you need to register.
http://www.pgware.com/downloads/?file=alloy.exe&type=trial
So this is the same as creating an installer pkg sizewise anyways.
Another not free but lower cost
http://www.softpedia.com/public/cat/5/2/5-2-19.shtml
Another not free but lower cost
http://www.moonlight-software.com/vbpower.htm
Another not free but lower cost
http://www.worldssp.net/software/VB-PowerWrap.htm
Looks like $49.95 minimun for VB : /
Free for .net
:)
-Ed
ASKER
i cant seem to get ilmerge to work. i put ilmerge in the same directoy as my .exe file, and ran
ilmerge /out:project1merged.exe project1.exe c:\windows\system32\glut32 .dll
and it gives me
ILMerge.Merge: There are no assemblies to merge in. Must have been an error in reading them in?
ilmerge /out:project1merged.exe project1.exe c:\windows\system32\glut32
and it gives me
ILMerge.Merge: There are no assemblies to merge in. Must have been an error in reading them in?
Just noticed this does not work with VB.NET, only C# sry
ilmerge homepage:
http://research.microsoft.com/%7Embarnett/ilmerge.aspx
-Ed
ilmerge homepage:
http://research.microsoft.com/%7Embarnett/ilmerge.aspx
-Ed
ASKER
i'm actually using vc++, but i guess thats not suporrted by ilmerge either.
any other ideas?
any other ideas?
OK this is very interesting. I have actually used a program called DLL to LIB that actually converts the DLL code to a static library, that you then link with instead of the normal LIB file. This program costs, but I downloaded a trial version of it, ran it on a DLL that I created myself and found that I could run the my EXE without the DLL. When linking with the normal LIB, the DLL was needed.
Download it from http://www.tucows.com/preview/218911.html. Run it on your DLL, then replace the LIB file you are using currently with the one it generates, #include the header file it generates also, and you should be good to go.
HTH
Download it from http://www.tucows.com/preview/218911.html. Run it on your DLL, then replace the LIB file you are using currently with the one it generates, #include the header file it generates also, and you should be good to go.
HTH
tell him to put glut32.dll into google and then down load it into the same folder as the .exe from one of the gazillion hits he will get. ( googling a missing .dll is part of "getting an .exe to work 101" )
DLL to LIB - Claims to be shareware:
http://www.ezgoal.com/channels/developer/f.asp?f=235956
http://www.ezgoal.com/channels/developer/f.asp?f=235956
cookre:
Hmm. Interesting. Well, I figured that shareware has some sort of fee involved somewhere along the line, as opposed to freeware.
Hmm. Interesting. Well, I figured that shareware has some sort of fee involved somewhere along the line, as opposed to freeware.
The common understanding is that if you like the package and decide to use it regularly, you pay a nominal fee. Although there is no legal requirement to pay, it is the proper thing to do.
The only gray area is that of single use. Some contend that one need pay only if the package is to be used regularly. Others hold that a single successful use warrants payment.
In the end, it's largely a matter of conscience.
The only gray area is that of single use. Some contend that one need pay only if the package is to be used regularly. Others hold that a single successful use warrants payment.
In the end, it's largely a matter of conscience.
Indeed, if the questioner decides to use this software then that is up to him. I expected there to be some limit on it, say in the size of the DLL it can convert, but after converting Kernel32.DLL I don't think that is the case.
There is probably some time limit on it hence. It would be highly unusual for the software to be fully working with the vendors only relying on a person's honesty and morals to get payment ;)
There is probably some time limit on it hence. It would be highly unusual for the software to be fully working with the vendors only relying on a person's honesty and morals to get payment ;)
ASKER
DLL to Lib made glut32.dll into glut32.lib and glut32_supp.h
what do I do with those to make it work?
what do I do with those to make it work?
They need to be explicitly added to the project.
Which compiler are you using, and if applicable, what is the project type?
Which compiler are you using, and if applicable, what is the project type?
For what it's worth, I just looked at the GLUT download page:
http://www.opengl.org/resources/libraries/glut/glut_downloads.html
The downloadable glutdlls36.zip already has LIBs in it.
http://www.opengl.org/resources/libraries/glut/glut_downloads.html
The downloadable glutdlls36.zip already has LIBs in it.
ASKER
visual c++ .net 2003
There should be something in there that allows you to chose what to link the project with. You need to add the lib file that was created by DLL to LIB here. Also #inlcude the header file generated in the main source file too.
Well, poo. I don't see any options for static linking under that compiler. For your sake, I hope somebody else can tell you what my bifocals can't find.
I don't think that it needs to be linked statically.
What I actually think happens is that the LIB file that contains *all* the source code gets built into the EXE instead of references to the code in the DLL. I linked mine normally, the only linking explicitly specified was dynamic linking to the MFC DLL when I was using that.
What I actually think happens is that the LIB file that contains *all* the source code gets built into the EXE instead of references to the code in the DLL. I linked mine normally, the only linking explicitly specified was dynamic linking to the MFC DLL when I was using that.
Include the DLL in the resource file of your application. (The *.res file) When your application starts, check if the DLL exists. If not, retrieve it from the resource file and write it to disk. When the application ends, delete the DLL from disk again. :-)
If you want to do it more advanced, it is possible to load a DLL just from memory so you don't need to write it to disk. But it's a bit too advanced for me...
If you want to do it more advanced, it is possible to load a DLL just from memory so you don't need to write it to disk. But it's a bit too advanced for me...
ASKER
ok, its too much trouble. first person to tell me that it just cant be done gets the points.
We need the source code if you want someone to build the application...
If *you* are not going to put in the time and the effort to get this to work, then yes, I guess that this cannot be done. But that is up to you :)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
points go to alex. thanks!
Thx