locked
Running MFC application developed on windows XP on windows 7 RRS feed

  • Question

  • Hi MFC experts,

    I got my first MFC application running on XP (which has full VS 2008 + SP1).

    I have two windows 7 machines: one in which has VS 2008 is installed and in other there is no VS 2008.

    My application was executed on both windows 7 machines

    1. One with VS 2008 - runs not a problem

    2. One without VS 2008 - doesnt run - throws following error dialog

    The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log for more detail

     

    My question is : Can I programmatically avoid this happening when building my MFC application on XP ? Or installing some VS related stuff is the only way to get rid of this problem. Please let me know. Thank you.


    Tuesday, November 1, 2011 10:18 AM

Answers

  • 2. One without VS 2008 - doesnt run - throws following error dialogThe application has failed to start because its side-by-side configuration is incorrect. Please see the application event log for more detail

    I'd guess you're not installing the necessary run-time library (DLLs).

    My question is : Can I programmatically avoid this happening when building my MFC application on XP ?

    If you change your project settings to statically link to MFC (and the
    'C' run-time library), you can usually eliminate needing to install
    the redistributables.

    On the other hand, if your application has multiple components that
    will only work with the shared (DLL) run-time, then static linking may
    not be an option for you.

    Dave

    • Marked as answer by veenviz Tuesday, November 1, 2011 11:44 AM
    Tuesday, November 1, 2011 11:07 AM

All replies

  • 2. One without VS 2008 - doesnt run - throws following error dialogThe application has failed to start because its side-by-side configuration is incorrect. Please see the application event log for more detail

    I'd guess you're not installing the necessary run-time library (DLLs).

    My question is : Can I programmatically avoid this happening when building my MFC application on XP ?

    If you change your project settings to statically link to MFC (and the
    'C' run-time library), you can usually eliminate needing to install
    the redistributables.

    On the other hand, if your application has multiple components that
    will only work with the shared (DLL) run-time, then static linking may
    not be an option for you.

    Dave

    • Marked as answer by veenviz Tuesday, November 1, 2011 11:44 AM
    Tuesday, November 1, 2011 11:07 AM
  • Hi Dave,

     

    Thanks a lot for the reply, I statically linked all dependent projects

    properties -> general -> Project defaults -> use of MFC = use MFC in a static library.

    And it worked

    Thanks again.

     

    Regards,

    Naveen

    Tuesday, November 1, 2011 11:32 AM