-
Visual C++ dilemma
Hi there,
just a quick question regarding Microsoft Visual C++
Ive made a program that builds and compiles fine and the .exe file generated runs perfectly well on my computer.
When i tried to send the .exe file to a friend, he couldn't get it to work as there was a missing .dll file.
Any1 know how i can make the .exe file independant for use on any machine??
Thanks !!
-
Don't use custom dll :)
IF I rememnber my VC correctly there is a package builder that comes with the visual enviroment.. its under the tools menu in start-programs-visual studio. That has a way of packageing your exe with all of its dependancies.
-
bballad, that deployment app works only for visual basic programs. But there are other installers... Suddenly can't remember any, though :)
ChrisWuk, what you can do is check out Dependency Walker (www.dependencywalker.com), a program that checks the dll dependencies of an exe. Then you can look up all the needed dlls.
In case the missing dll is a mfc dll, there is an option in visual studio to statically link to mfc. Your exe will be bigger, but you don't need to supply the mfc dll. You can choose this option when you first create an mfc program - in VS7, under application type -> use of mfc.
-
It is a mfc .dll, so are u saying i have to start the coding and design again if i want it to be independant :(
There must be a way around this, im using Visual C++ version 6
-
Quote:
Originally posted here by proactive
bballad, that deployment app works only for visual basic programs. But there are other installers... Suddenly can't remember any, though :)
ChrisWuk, what you can do is check out Dependency Walker (www.dependencywalker.com), a program that checks the dll dependencies of an exe. Then you can look up all the needed dlls.
In case the missing dll is a mfc dll, there is an option in visual studio to statically link to mfc. Your exe will be bigger, but you don't need to supply the mfc dll. You can choose this option when you first create an mfc program - in VS7, under application type -> use of mfc.
I had forgoten that it only worked with VB...oh well.
there is a dependancy checker bundled in with visual studieo also in the tools list...as for Chris's problem i think there is actualy a packager built into vc, if not then there are third party packagers like install sheild.
-
install shield? Doi just have to point it i nthe direction of the .exe file to make it work?
I can't find anything in Visual studio to help me !
Incase its needed, the missing .dll is called msc42d.dll
Any help is apprciated !!!
-
Unfortunitly I have never used install sheild so I am not sure on how it works...you could always figure out what directory the .dll is in (probably windows/system) copy it form your system and then put it in the right directory on his (this could be done in a zip that preserved directory structure I think...should work never tried it)
-
I just fired up my VS7, and I don't think you have to start from scratch to statically link in VS6. At least in VS7, you can right click your project - choose properties - and in the general settings tab, change the setting "Use of MFC".