Freigeben über


Deploying apps built with C++ AMP

This blog post addresses what has very quickly become an FAQ in the last few days: “What must I deploy on customer machines for my app that uses C++ AMP to function?”

vcamp110.dll

Beyond the optional Visual Studio tooling support, C++ AMP consists of compiler enhancements (they are baked into the Visual C++ compiler), a library (mostly in <amp.h>), and a runtime (vcamp110.dll).

So at runtime your app that uses C++ AMP needs to find vcamp110.dll. You cannot statically link to the C++ AMP runtime, so your app has to somehow find that DLL on the machine where it executes, i.e. only dynamic linking is supported.

Note that vcamp110.dll has a dependency on the MS C runtime libraries (msvcr110.dll and msvcp110.dll). In Beta, the vcamp110.dll used the static version of these libraries and hence did not require them to be available. For RTM, it uses the DLL version of the C runtime libraries.

Also note that, as per the typical pattern, there is a debug version (vcamp110d.dll) which you probably wouldn’t be deploying unless you wanted to perform remote debugging.

Deployment Mechanism

The deployment story is the same as for any C++ application, and as documented on this MSDN page for deployment of C++ apps in VS2010.

In other words, vcamp110.dll (and its dependencies) are part of the “Microsoft Visual C++ 11 Redistributable Package” aka “VCRedist”.

Quick Dirty Deployment Test

To test a deployment to a specific machine, that does not rely on the VCRedist, you can try the DeployAMP.zip from here. To test a machine to see if it has a capable card, you can try the utility from here.

Comments

  • Anonymous
    March 12, 2012
    Thanks, Daniel.  One follow-up question.  What target OS platforms can I deploy on?  Will C++ AMP apps run on Windows XP or Vista?

  • Anonymous
    March 12, 2012
    Hi Paul, Microsoft’s implementation supports Windows 7 and Windows 8 and the equivalent server versions (and any products building on these client and server versions). So, no there is definitely no support for Windows XP and we did not test on Windows Vista (even though in theory it should work there, but we definitely do not support it). Thanks for the question.

  • Anonymous
    March 12, 2012
    "For RTM, we are considering changing to use the DLL version of the C runtime libraries." Don't! Whipping 1 additional DLL is fine, even better if we can put it exactly where we want like vcompXX.dll (thanks to _OPENMP_NOFORCE_MANIFEST). What NOBODY wants is to be forced to ship the C/C++ redistribuable and offer end-users one more way to break our apps.

  • Anonymous
    March 13, 2012
    I'm in favor of including vcamp110.dll as part of vcredist. We already install vcredist with our application and one less extra thing to remember is good.

  • Anonymous
    March 15, 2012
    The comment has been removed