1

I don't mean "portable" in a way that you can re-compile the source code under Linux or whatever, but rather a Windows-only application that does not require installation, so you just put the .exe and some dll-s in a folder and copy it to another machine and it works.

It didn't require any effort at all with VS 2003 and earlier, but with 2008 putting the missing dll-s into same folder doesn't work, it requires installing re-distributables. I remember hearing that the problem can be solved with manifests, which I have never encountered before.

So, how can I do that?

linuxbuild
  • 15,843
  • 6
  • 60
  • 87
Headcrab
  • 6,838
  • 8
  • 40
  • 45

3 Answers3

2

Link with static libraries for CRT, MFC, and anything else you use. Make sure you don't use Win32 APIs that were introduced in Vista or Win7 (i.e., keep WIN32_WINNT <= 0x501). Use Dependency Walker to ensure that your executable only imports kernel32, user32, gdi32, or other things that are guaranteed to be in a default windows install.

Tim Sylvester
  • 22,897
  • 2
  • 80
  • 94
0

What about statically linking the c runtime? Your resulting executable will be bigger though.

Ralf
  • 9,405
  • 2
  • 28
  • 46
0

Also look at the backward binary compatibility reports for all interested versions of Windows: https://abi-laboratory.pro/index.php?view=windows

And check if your binaries/dlls import any of the removed/changed symbols.

The reports have been generated by the abi-compliance-checker tool.

enter image description here

linuxbuild
  • 15,843
  • 6
  • 60
  • 87