Distributing application that uses OpenMP

G

Guest

I have an application that I built with Visual Studio 2005 and for which I
enabled OpenMP. If I open the compiled binary in Visual Studio, this is the
manifest that is embedded in the executable as RT_MANIFEST entry 1:

<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.VC80.CRT"
version="8.0.50608.0" processorArchitecture="x86"
publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.VC80.OpenMP"
version="8.0.50608.0" processorArchitecture="x86"
publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
</dependentAssembly>
</dependency>
</assembly>

I encounter a problem however, when I distribute this application to
machines without Visual Studio 8 runtime dll's. I have attempted to overcome
this problem, by distributing the files found in the Visual Studio
installation directory, "C:\Program Files (x86)\Microsoft Visual Studio
8\VC\redist\x86". However, if you examine the manifest file in the
"C:\Program Files (x86)\Microsoft Visual Studio
8\VC\redist\x86\Microsoft.VC80.OPENMP" directory you will see the manifest
file shown below:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!-- Copyright © 1981-2001 Microsoft Corporation -->
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<noInheritable/>
<assemblyIdentity type="win32" name="Microsoft.VC80.OpenMP"
version="8.0.50727.42" processorArchitecture="x86"
publicKeyToken="1fc8b3b9a1e18e3b"/>
<file name="vcomp.dll" hash="0d009725bd5653af143fdfd9d8abf8adad533d16"
hashalg="SHA1"/>
</assembly>

My problem is that my executable specifies a dependency on version
8.0.50608.0, but I am distributing version 8.0.50727.42.

I have determined one workaround to this problem and that is to run the
"vcredist_x86.exe" found in the "C:\Program Files (x86)\Microsoft Visual
Studio 8\SDK\v2.0\BootStrapper\Packages\vcredist_x86" on the machine that
does not have the Visual Studio 8 runtime dll's present. This installs the
OpenMP version 8.0.50727.42 into the Windows Side-By-Side cache, but it also
installs a redirection rule that will cause the OS loader to load version
8.0.50727.42 of the OpenMP dll if requests for versions 8.0.50608.0 of the
OpenMP dll are made.

I do NOT however like this workaround, because running "vcredist_x86.exe"
requires Administrator privileges and I would like to be able to install my
application on user's machines without Administrator privileges being
required.

I have been trying to create a custom redirect rule just for my executable
and having created the following file, called Comet.exe.config:

<?xml version="1.0"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.VC80.OpenMP"
publicKeyToken="1fc8b3b9a1e18e3b" />
<publisherPolicy apply="yes" />
<bindingRedirect oldVersion="8.0.50608.0" newVersion="8.0.50727.42" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

I have put this file in the same directory as my executable, Comet.exe. But
I am still unable to run my executable on a machine without the Visual Studio
8 dll's.

Does any have ideas what am I doing wrong, or any other ideas I can try?

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top