What are the files to include?

I have complied a VC program that runs well on my computer that is used to develop the software. However, when I go to other machines, it asked me for a lot of other dlls... and after included whatever dll it asked in the parent directory, it also ask for some files that are found in the directory where you installed Visual C++ under mfc\src directory. May I know what causes this 'strange' or 'normal' behaviour? May I know how to get around this problem so that I can pass the complied files to my friends? Thank you very much for your help! :)
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Easy Solution: Statically link to MFC (you won't require additional DLLs)

Not-so-Easy Solution: You will need all MFC*.DLL files in your Windows\System directory, as well as some for DAO if you use databases. Check in the Redist folder in your Visual C++ CD for files you should distribute.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
msvcrt.dll for the c runtime dll
mfc40(d).dll for vc5 (debug version)
mfc42(d).dll for vc6 (debug version)

you can install the quick view of win9X.
right click the exe file and select the quick view,
you can find what dll are need.

Try this command .
dumpbin /dependents "filename".
This will give you files on which your app is dependent.Include these files in the  path or in the same directory as your app.

dumpbin.exe is included in vc++ install. It will be in devstudio\vc\bin directory.

tszwangAuthor Commented:
Hi luisr! Thank you very much. The problem is solved. The source of the problem in the end is that I did not include a file that is to be read by the program. Once that is in the correct directory, the program stops asking me for any other files! Thank you very much for your help!!! :) Cheers! Nice meeting you! :)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.