Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

exe problem...

Status
Not open for further replies.

aselsus

Technical User
Aug 16, 2004
4
CA
Hi,I make some executable program with MFC but if I take .exe file (from debug file section) and trying to execute in the different computer it gives an error and say some dll lost,I try to make a dll for this program but it don't work may be I can't do it right;
I'm so happy for anyone help
 
Yes, MFC usually requires you to copy not only your .exe file, but also some MFC DLLs. I'm not sure how to tell which DLLs you will need without trial and error. You can find the DLLs in your Windows\System or System32 directory.

Does anyone know of an easy way to tell which DLLs you will need to include without having to run the .exe on another computer?
 
if you're using VC6 the dll you will need is probably mfc42.dll. there's a 'd' in the name of the one for debug builds. Something like "mfc42d.dll" Make sure that you get the one with the 'd' in the title if you're using the debug version, and the one without the d if it's a Release version. For .Net 2003, I think it's mfc71.dll (same thing with the 'd's).

bdiamond
 
I've created MFC programs before that have required quite a few more DLLs than just that one.
 
true, very true, cpjust. I was just trying to offer a little help. Also, if it IS just the MFC dll that is missing and you don't want to have to worry about that, just select that you want MFC statically linked in your project settings.

bdiamond
 
Do you know a better way other than trial & error, to know all of the DLLs that you'll need?
I see in the MSDN it says something like: "Library: Use Advapi32.lib." Does that mean I should include advapi32.dll, or do some .lib files not not correspond directly to a .dll file with the same name?
 
What about project option "Use MFC as static library" or something like that in common options tab?
 
ok boys ;so I take mfc42d.dll from my program to target computers system directory is it I correct understand ?
 
>ok boys ;so I take mfc42d.dll from my program to target computers system directory is it I correct understand ?

Do that if the target computer is your own and you're really gonna debug it. Ie not a customer's: you shouldn't ship debug builds.

Note 1) You're not allowed to distrubute MS's debug libraries at will.

Note 2) When distributing other libraries than your own make sure to use the correct installation package, dont try to band-aid it together by yourself.

/Per

"It was a work of art, flawless, sublime. A triumph equaled only by its monumental failure."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top