Search code examples
c++windowsdeploymentwxwidgets

What is best practice for deploying an application as static or as dynamic build?


I am planning to release and deploy an application, written in C++ and wxWidgets. The wxWidgets-library is available as dll and as well as static library. Therefore, i have the option to deploy the application as dynamic built application or as static build.

Currently, i prefer the static-build option, because:

  • the executable is not too big ( < 20 MegaByte).
  • there are no dependencies to consider.
  • there is no installation required.

Question

Did i miss something very important?


Solution

  • My suggestion would be to go for static linkage. My two cents on advantage:

    • You aren't dependent on WX toolset being installed on client site, neither you need to give it bundled with your installer, not as standalone installer as a prerequisite.
    • You don't expect or ask the customer to do WX installation (or even XCOPY deployment). Customer won't bother!
    • 20MBs is quite small in TBs of world and good MBs of Internet speed.
    • You don't get unexpected behavior bugs from customer, if they happen to use higher/lower version of library.
    • You can be confident that application will work the same way you tested in your environment (mostly)
    • You can continue using X version of WX, even if buggy/flashy X+1 version comes out. You don't want to let customer have "newer and refined" version of library, which breaks your app!