All VC Libs DLLs require manifests to load them. Manifest should be generated and embedded in the binary when the project is built in the IDE.
For OpenMP the manifest is generated when omp.h is included. There are cases where a dependency on vcomp.dll can be pulled in without using the header. In these cases the manifest may not be generated.
To generate the manifest, include omp.h and built your project. IDE built projects will automatically embed the manifest in the binary (unless the project settings were changed to disable it)
If you are building from the command line then you can use the following to embed the manifest in the binary.
For EXEs
mt.exe -outputresource:<binary name>;1 -manifest <bianry name>.manifest
For DLLs
mt.exe -outputresource:<binary name>;2 -manifest <bianry name>.manifest
cl /MD b.cpp /LD
Once you have the manifest for your app you can deploy vcomp.dll
1. Shared location (%SYSTEMROOT%\WinSXS)
a. Using vcredist.exe - Installs all the VC DLLs
b. By merging the OMP MSM into your setup
2. Applocal install
Copy the OpenMP directory under VC\redist\<platform> as a subdirectory of the app directory.
http://msdn2.microsoft.com/zebw5zk9(en-US,VS.80).aspx has the deployment details.
Sridhar Madhugiri
Software Engineer
Visual C++
本文介绍了解决AllVCLibs DLL加载时需要manifest文件的问题。通过在项目中包含omp.h并使用mt.exe工具,可以为EXE和DLL生成并嵌入manifest文件。文章还提供了如何部署vcomp.dll的方法,包括共享位置安装和应用程序本地安装。
938

被折叠的 条评论
为什么被折叠?



