Skip to content

Standard library

Conveyor ships with some pre-canned config snippets to help you configure your package for popular frameworks and libraries.

Microsoft Visual C++ redistributables

Windows apps sometimes require DLLs like msvcp140.dll, vcruntime140.dll etc. These don't come with Windows and most toolchains won't bundle them with your app either, expecting you to do it at packaging time.

To bundle these DLLs, write:

include required("/stdlib/windows/msvc.conf")

msvc.input.remap = [
  # Name the DLLs you need here:
  msvcp140.dll
  vcruntime140.dll
  vcruntime140_1.dll

  # And drop the rest.
  "-**"
]

If you don't specify msvc.input.remap then all the DLLs will be included. This should always be safe but can bloat your package. The following files are available:

  • concrt140.dll
  • mfc140.dll
  • mfc140chs.dll
  • mfc140cht.dll
  • mfc140deu.dll
  • mfc140enu.dll
  • mfc140esn.dll
  • mfc140fra.dll
  • mfc140ita.dll
  • mfc140jpn.dll
  • mfc140kor.dll
  • mfc140rus.dll
  • mfc140u.dll
  • mfcm140.dll
  • mfcm140u.dll
  • msvcp140.dll
  • msvcp140_1.dll
  • msvcp140_2.dll
  • msvcp140_atomic_wait.dll
  • msvcp140_codecvt_ids.dll
  • vcamp140.dll
  • vccorlib140.dll
  • vcomp140.dll
  • vcruntime140.dll
  • vcruntime140_1.dll
  • vcruntime140_threads.dll

The msvc.conf stdlib file looks like this:

msvc.version = 14.38.32919

msvc.redist-url-base = downloads.hydraulic.dev/msvc-redist
msvc.amd64.redist-url = ${msvc.redist-url-base}/msvc-redist-x64-${msvc.version}.zip
msvc.aarch64.redist-url = ${msvc.redist-url-base}/msvc-redist-arm64-${msvc.version}.zip

msvc.input = {}

msvc.windows.amd64.inputs = ${msvc.input} {
  from = ${msvc.amd64.redist-url}
}

msvc.windows.aarch64.inputs = ${msvc.input} {
  from = ${msvc.aarch64.redist-url}
}

app.windows.amd64.inputs += ${msvc.windows.amd64.inputs}
app.windows.aarch64.inputs += ${msvc.windows.aarch64.inputs}

Normally Microsoft don't distribute these DLLs in zip form. We extract the DLLs from their VC++ runtime packages and host them for you, so you can include only what you need. Normally your app framework will tell you what DLLs are required but if you don't know or are writing a native app you can use Dependency Walker to find out. Our hosted redistributables include these DLLs at version 14.38.32919.0.

Note

  • It may appear at first that you don't need these DLLs, because it's common for Windows apps to install them to c:\windows\system32. However if you don't bundle them then your app may break on clean/fresh Windows installs where nothing else has provided them.
  • HotSpot based JVMs already have these DLLs included.