MFC portability

I wrote a program and compiled it on my laptop(WinXP Home) using MFC in VS 2003.NET and took it to school and tried to run it on one of their computers(WinXP Pro) and I it said it couldn't run because it couldn't find "MFC71.DLL". Are MFC programs not portable and if not is there a way to write a program in Visual C++ so it is

Answer this question

MFC portability

  • BradLeach

    Nathan87 wrote:
    I wrote a program and compiled it on my laptop(WinXP Home) using MFC in VS 2003.NET and took it to school and tried to run it on one of their computers(WinXP Pro) and I it said it couldn't run because it couldn't find "MFC71.DLL". Are MFC programs not portable and if not is there a way to write a program in Visual C++ so it is

    It's not about portability here. Since your program dynamically uses MFC, the target machine needs the required DLL. You can do a static build to avoid this issue.



  • Bertrand Larsy

    how can I do a static build

  • Ashishbuddha

    Thanks I'll try it and see if it fixes it.

  • Jim25_SQL

    ok now I have another problem. it compiles fine, and when I run it I don't get any errors, but when it runs if flickers on the screen and then closes again immediately. I checked my code there is nothing to tell the program to close except when the correct menuItem is clicked. Please help, this makes no senes to me.

  • rtmos

    Nathan87 wrote:
    how can I do a static build

    In your Project Settings, set "Use of MFC" to "Use MFC in a Static Library"



  • MFC portability