0

I have a project that targets legacy systems (XP/2000 being the earliest), maintained in Visual Studio 2019, that currently uses dynamically linked libraries.

When installing on other systems I have to install the VC++ redistributable on those systems before the program will function. One solution to this problem I found was to statically link the files so that they are contained within the executable.

I looked at setting prerequisites in the setup project, but these require access to an internet connection which is often not the case for my software's users.

First, is this a reasonable response to this issue?

Second, is maintaining a statically linked project different than maintaining a dynamically linked project, say when the compiler updates or Visual Studio comes out with a new version/toolset?

satazero
  • 37
  • 7
  • Does your program use any 3rd-party libraries, and pass CRT objects across module boundaries? In that case you cannot statically link against the C++ support libraries. – IInspectable Jul 09 '21 at 18:55
  • @IInspectable the program works perfectly without dynamically linking, so I'd say no. We recently just moved all external libraries to be maintained within the project itself. – satazero Jul 09 '21 at 19:07
  • I asked a question, not whether the program appears to be working. – IInspectable Jul 10 '21 at 06:59
  • Just link statically. Maintaining a statically linked project is no different from maintaining a dynamically linked project. – Jabberwocky Jul 12 '21 at 09:44
  • @Jabberwocky does statically linking solve my portability issues? – satazero Jul 12 '21 at 13:36
  • @satazero I'm not sure if you can run a .exe compiled with Visual Studio 2019 on anything older than Windows Vista unless you have the windowx xp support installed. This question https://stackoverflow.com/questions/58755564/visual-studio-2019-how-to-use-platform-toolset-v140-xp and this question https://stackoverflow.com/a/35666906/898348 might be interesting for you. – Jabberwocky Jul 12 '21 at 13:55

0 Answers0