a not fun question: how to deploy a utility program written in MFC and C++
-
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....
-
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....
[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.
-
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....
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!
-
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....
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.
-
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!
not using installer. just xcopy command etc.
diligent hands rule....
-
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.
I plan to use MFC DLL dynamically linked option. I have several utilities to distribute in one bundle...
diligent hands rule....
-
[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.
thanks
diligent hands rule....
-
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.
your screenshots are very helpful. thanks.
diligent hands rule....
-
I plan to use MFC DLL dynamically linked option. I have several utilities to distribute in one bundle...
diligent hands rule....
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)
-
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)
thank you! first to know VS 2015, VS 2017,and VS2019 have the same redistribute.
diligent hands rule....
-
thank you! first to know VS 2015, VS 2017,and VS2019 have the same redistribute.
diligent hands rule....
Yes, this is the future direction going forward because MS does not want the user to install many VC++ redistributables on their machine.