Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. a not fun question: how to deploy a utility program written in MFC and C++

a not fun question: how to deploy a utility program written in MFC and C++

Scheduled Pinned Locked Moved C / C++ / MFC
c++visual-studioquestioncsharpdesign
11 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Southmountain
    wrote on last edited by
    #1

    I wrote a small utility tool with MFC (for user interface) and purely C++ code. on Windows 10 and in Visual Studio 2017 IDE, I compiled this program into .exe file (i.e. HelloX.exe) in MFC dynamic DLL option. So I put vcruntime140.dll and mfc140u.dll at the same folder. I test my program on Windows Vista, it works well. I just tested this program on Windows XP and it did not work(few minutes ago). Any suggestion or comments to share? thanks a million.

    diligent hands rule....

    J M S 3 Replies Last reply
    0
    • S Southmountain

      I wrote a small utility tool with MFC (for user interface) and purely C++ code. on Windows 10 and in Visual Studio 2017 IDE, I compiled this program into .exe file (i.e. HelloX.exe) in MFC dynamic DLL option. So I put vcruntime140.dll and mfc140u.dll at the same folder. I test my program on Windows Vista, it works well. I just tested this program on Windows XP and it did not work(few minutes ago). Any suggestion or comments to share? thanks a million.

      diligent hands rule....

      J Offline
      J Offline
      Jon McKee
      wrote on last edited by
      #2

      [C/C++/MFC forum](https://www.codeproject.com/Forums/1647/C-Cplusplus-MFC.aspx) or [Quick Answers](https://www.codeproject.com/script/Answers/List.aspx?tab=active). Specific programming questions are generally frowned upon in the Lounge per the sticky post at the top.

      S 1 Reply Last reply
      0
      • S Southmountain

        I wrote a small utility tool with MFC (for user interface) and purely C++ code. on Windows 10 and in Visual Studio 2017 IDE, I compiled this program into .exe file (i.e. HelloX.exe) in MFC dynamic DLL option. So I put vcruntime140.dll and mfc140u.dll at the same folder. I test my program on Windows Vista, it works well. I just tested this program on Windows XP and it did not work(few minutes ago). Any suggestion or comments to share? thanks a million.

        diligent hands rule....

        M Offline
        M Offline
        Maximilien
        wrote on last edited by
        #3

        Deploy as in creating an [installer](https://en.wikipedia.org/wiki/List\_of\_installation\_software) ? For small packages like yours, I would use [inno setup](https://jrsoftware.org/isinfo.php) to package your software.

        I'd rather be phishing!

        S 1 Reply Last reply
        0
        • S Southmountain

          I wrote a small utility tool with MFC (for user interface) and purely C++ code. on Windows 10 and in Visual Studio 2017 IDE, I compiled this program into .exe file (i.e. HelloX.exe) in MFC dynamic DLL option. So I put vcruntime140.dll and mfc140u.dll at the same folder. I test my program on Windows Vista, it works well. I just tested this program on Windows XP and it did not work(few minutes ago). Any suggestion or comments to share? thanks a million.

          diligent hands rule....

          S Offline
          S Offline
          Shao Voon Wong
          wrote on last edited by
          #4

          To deploy without having to install the VC++ dlls. Linking to C runtime statically (Multithreaded (/MT) for Release build) http://imageshack.com/a/img923/6600/ifeLcs.png If you are using MFC, linking to MFC runtime statically. http://imageshack.com/a/img921/1331/7eBoZW.png The downside to linking statically is your executable size will be bigger but it only links the classes and functions your executable calls whereas, in the dynamically linkage case, the VC++ dlls have to contains all the code regardless your executable calls them or not.

          S 2 Replies Last reply
          0
          • M Maximilien

            Deploy as in creating an [installer](https://en.wikipedia.org/wiki/List\_of\_installation\_software) ? For small packages like yours, I would use [inno setup](https://jrsoftware.org/isinfo.php) to package your software.

            I'd rather be phishing!

            S Offline
            S Offline
            Southmountain
            wrote on last edited by
            #5

            not using installer. just xcopy command etc.

            diligent hands rule....

            1 Reply Last reply
            0
            • S Shao Voon Wong

              To deploy without having to install the VC++ dlls. Linking to C runtime statically (Multithreaded (/MT) for Release build) http://imageshack.com/a/img923/6600/ifeLcs.png If you are using MFC, linking to MFC runtime statically. http://imageshack.com/a/img921/1331/7eBoZW.png The downside to linking statically is your executable size will be bigger but it only links the classes and functions your executable calls whereas, in the dynamically linkage case, the VC++ dlls have to contains all the code regardless your executable calls them or not.

              S Offline
              S Offline
              Southmountain
              wrote on last edited by
              #6

              I plan to use MFC DLL dynamically linked option. I have several utilities to distribute in one bundle...

              diligent hands rule....

              S 1 Reply Last reply
              0
              • J Jon McKee

                [C/C++/MFC forum](https://www.codeproject.com/Forums/1647/C-Cplusplus-MFC.aspx) or [Quick Answers](https://www.codeproject.com/script/Answers/List.aspx?tab=active). Specific programming questions are generally frowned upon in the Lounge per the sticky post at the top.

                S Offline
                S Offline
                Southmountain
                wrote on last edited by
                #7

                thanks

                diligent hands rule....

                1 Reply Last reply
                0
                • S Shao Voon Wong

                  To deploy without having to install the VC++ dlls. Linking to C runtime statically (Multithreaded (/MT) for Release build) http://imageshack.com/a/img923/6600/ifeLcs.png If you are using MFC, linking to MFC runtime statically. http://imageshack.com/a/img921/1331/7eBoZW.png The downside to linking statically is your executable size will be bigger but it only links the classes and functions your executable calls whereas, in the dynamically linkage case, the VC++ dlls have to contains all the code regardless your executable calls them or not.

                  S Offline
                  S Offline
                  Southmountain
                  wrote on last edited by
                  #8

                  your screenshots are very helpful. thanks.

                  diligent hands rule....

                  1 Reply Last reply
                  0
                  • S Southmountain

                    I plan to use MFC DLL dynamically linked option. I have several utilities to distribute in one bundle...

                    diligent hands rule....

                    S Offline
                    S Offline
                    Shao Voon Wong
                    wrote on last edited by
                    #9

                    Then download VC++ redistributables to install on your client machine before running your utilities. [https://support.microsoft.com/en-sg/help/2977003/the-latest-supported-visual-c-downloads\](https://support.microsoft.com/en-sg/help/2977003/the-latest-supported-visual-c-downloads)

                    S 1 Reply Last reply
                    0
                    • S Shao Voon Wong

                      Then download VC++ redistributables to install on your client machine before running your utilities. [https://support.microsoft.com/en-sg/help/2977003/the-latest-supported-visual-c-downloads\](https://support.microsoft.com/en-sg/help/2977003/the-latest-supported-visual-c-downloads)

                      S Offline
                      S Offline
                      Southmountain
                      wrote on last edited by
                      #10

                      thank you! first to know VS 2015, VS 2017,and VS2019 have the same redistribute.

                      diligent hands rule....

                      S 1 Reply Last reply
                      0
                      • S Southmountain

                        thank you! first to know VS 2015, VS 2017,and VS2019 have the same redistribute.

                        diligent hands rule....

                        S Offline
                        S Offline
                        Shao Voon Wong
                        wrote on last edited by
                        #11

                        Yes, this is the future direction going forward because MS does not want the user to install many VC++ redistributables on their machine.

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups