EDN Admin
Well-known member
http://forums.msdn.microsoft.com/zh-CN/vcgeneral/thread/b2aacd05-d9e9-4c6f-95f5-d6c005c9a5c6/
<font class=quoteHeader>Aqualize 说:</font> Im using visual studio 2008 professional with vista business x64.
I would like to build native 64-bit applications but have run into some problems.
At first I couldnt run any x64 program I compiled and not even the cl.exe for amd64 (64-bit native compiler).
I
installed the 64-bit development tools when I installed VC++ and after
this I have also done a repair install of visual studio.
I followed this guide to make the project compile for 64-bit.
"How to: Configure Visual C++ Projects to Target 64-Bit Platforms"
http://msdn2.microsoft.com/sv-se/library/9yb4317s(en-us).aspx
After
this I downloaded and installed the x64 version of the visual studio
2008 redist (vcredist_x64). Now Iam able to run the .exe I build with
configuration "Release" for x64. But still not "Debug" (and I need the
debug).
Ive verified with task manager that the "Release" really is
64-bit (it doesnt have the *32 suffix in its name in the process
list).
Building Win32 Debug works fine.
When I try to start a
x64 Debug-built program I get a error complaining about the
side-by-side configuration is incorrect. The application eventlog
(eventvwr.msc) says this:
<font style="font-style:italic Event ID 33, sidebyside</font><br style="font-style:italic <br style="font-style:italic <font style="font-style:italic Activation
context generation failed for "H:Visual Studio
2008Projectstestx64x64Debugtestx64.exe". Dependent Assembly
Microsoft.VC90.DebugCRT,processorArchitecture="amd64",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8"
could not be found. Please use sxstrace.exe for detailed diagnosis.
</font>I tried the sxstrace and got this:
<font style="font-style:italic =================</font><br style="font-style:italic <font style="font-style:italic Begin Activation Context Generation.</font><br style="font-style:italic <font style="font-style:italic Input Parameter:</font><br style="font-style:italic <font style="font-style:italic Flags = 0</font><br style="font-style:italic <font style="font-style:italic ProcessorArchitecture = AMD64</font><br style="font-style:italic <font style="font-style:italic CultureFallBacks = en-US;en</font><br style="font-style:italic <font style="font-style:italic ManifestPath = H:Visual Studio 2008Projectstestx64x64Debugtestx64.exe</font><br style="font-style:italic <font style="font-style:italic AssemblyDirectory = H:Visual Studio 2008Projectstestx64x64Debug</font><br style="font-style:italic <font style="font-style:italic Application Config File = </font><br style="font-style:italic <font style="font-style:italic -----------------</font><br style="font-style:italic <font style="font-style:italic INFO: Parsing Manifest File H:Visual Studio 2008Projectstestx64x64Debugtestx64.exe.</font><br style="font-style:italic <font style="font-style:italic INFO: Manifest Definition Identity is (null).</font><br style="font-style:italic <font style="font-style:italic
INFO: Reference:
Microsoft.VC90.DebugCRT,processorArchitecture="amd64",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8"</font><br style="font-style:italic <font style="font-style:italic INFO:
Resolving reference
Microsoft.VC90.DebugCRT,processorArchitecture="amd64",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8".</font><br style="font-style:italic <font style="font-style:italic INFO: Resolving reference for ProcessorArchitecture amd64.</font><br style="font-style:italic <font style="font-style:italic INFO: Resolving reference for culture Neutral.</font><br style="font-style:italic <font style="font-style:italic INFO: Applying Binding Policy.</font><br style="font-style:italic <font style="font-style:italic INFO: No publisher policy found.</font><br style="font-style:italic <font style="font-style:italic INFO: No binding policy redirect found.</font><br style="font-style:italic <font style="font-style:italic INFO: Begin assembly probing.</font><br style="font-style:italic <font style="font-style:italic INFO: Did not find the assembly in WinSxS.</font><br style="font-style:italic <font style="font-style:italic
INFO: Attempt to probe manifest at
C:WindowsassemblyGAC_64Microsoft.VC90.DebugCRT9.0.21022.8__1fc8b3b9a1e18e3bMicrosoft.VC90.DebugCRT.DLL.</font><br style="font-style:italic <font style="font-style:italic INFO: Attempt to probe manifest at H:Visual Studio 2008Projectstestx64x64DebugMicrosoft.VC90.DebugCRT.DLL.</font><br style="font-style:italic <font style="font-style:italic
INFO: Attempt to probe manifest at H:Visual Studio
2008Projectstestx64x64DebugMicrosoft.VC90.DebugCRT.MANIFEST.</font><br style="font-style:italic <font style="font-style:italic
INFO: Attempt to probe manifest at H:Visual Studio
2008Projectstestx64x64DebugMicrosoft.VC90.DebugCRTMicrosoft.VC90.DebugCRT.DLL.</font><br style="font-style:italic <font style="font-style:italic
INFO: Attempt to probe manifest at H:Visual Studio
2008Projectstestx64x64DebugMicrosoft.VC90.DebugCRTMicrosoft.VC90.DebugCRT.MANIFEST.</font><br style="font-style:italic <font style="font-style:italic INFO: Did not find manifest for culture Neutral.</font><br style="font-style:italic <font style="font-style:italic INFO: End assembly probing.</font><br style="font-style:italic <font style="font-style:italic
ERROR: Cannot resolve reference
Microsoft.VC90.DebugCRT,processorArchitecture="amd64",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8".</font><br style="font-style:italic <font style="font-style:italic ERROR: Activation Context generation failed.</font><br style="font-style:italic <font style="font-style:italic End Activation Context Generation.</font>
<font style="font-weight:bold <font size=4><font style="" face=Arial>Edit:
</font></font></font>
<font size=4><font style="" face=Arial><font size=2><font style="" face=Arial>I
compared my project setting with the sample projects provided with
Visual Studio. I found a work-around for this problem (but not a
perfect solution). In the project property page under "Configuration
Properties --> C/C++ --> Code Generation" I changed "Runtime
Library" from "Multi-threaded Debug <font style="font-weight:bold DLL</font> (/MDd)" to "Multi-threaded Debug (/MTd)".
Seems
that the runtime for debugging isnt installed. I havent installed the
platform SDK, just plain Visual Studio 2008 so maybe the arent
installed.</font></font></font></font>
<font style="font-size:28px" color="#ff6666 this is some related topic. He described a situation when trying to develop 64bit programs
But I encountered nearly the same question when Im developing a 32bit program.
how to solve it?
</font>
<hr size="1" align="left" width="25% no mistakes
View the full article
<font class=quoteHeader>Aqualize 说:</font> Im using visual studio 2008 professional with vista business x64.
I would like to build native 64-bit applications but have run into some problems.
At first I couldnt run any x64 program I compiled and not even the cl.exe for amd64 (64-bit native compiler).
I
installed the 64-bit development tools when I installed VC++ and after
this I have also done a repair install of visual studio.
I followed this guide to make the project compile for 64-bit.
"How to: Configure Visual C++ Projects to Target 64-Bit Platforms"
http://msdn2.microsoft.com/sv-se/library/9yb4317s(en-us).aspx
After
this I downloaded and installed the x64 version of the visual studio
2008 redist (vcredist_x64). Now Iam able to run the .exe I build with
configuration "Release" for x64. But still not "Debug" (and I need the
debug).
Ive verified with task manager that the "Release" really is
64-bit (it doesnt have the *32 suffix in its name in the process
list).
Building Win32 Debug works fine.
When I try to start a
x64 Debug-built program I get a error complaining about the
side-by-side configuration is incorrect. The application eventlog
(eventvwr.msc) says this:
<font style="font-style:italic Event ID 33, sidebyside</font><br style="font-style:italic <br style="font-style:italic <font style="font-style:italic Activation
context generation failed for "H:Visual Studio
2008Projectstestx64x64Debugtestx64.exe". Dependent Assembly
Microsoft.VC90.DebugCRT,processorArchitecture="amd64",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8"
could not be found. Please use sxstrace.exe for detailed diagnosis.
</font>I tried the sxstrace and got this:
<font style="font-style:italic =================</font><br style="font-style:italic <font style="font-style:italic Begin Activation Context Generation.</font><br style="font-style:italic <font style="font-style:italic Input Parameter:</font><br style="font-style:italic <font style="font-style:italic Flags = 0</font><br style="font-style:italic <font style="font-style:italic ProcessorArchitecture = AMD64</font><br style="font-style:italic <font style="font-style:italic CultureFallBacks = en-US;en</font><br style="font-style:italic <font style="font-style:italic ManifestPath = H:Visual Studio 2008Projectstestx64x64Debugtestx64.exe</font><br style="font-style:italic <font style="font-style:italic AssemblyDirectory = H:Visual Studio 2008Projectstestx64x64Debug</font><br style="font-style:italic <font style="font-style:italic Application Config File = </font><br style="font-style:italic <font style="font-style:italic -----------------</font><br style="font-style:italic <font style="font-style:italic INFO: Parsing Manifest File H:Visual Studio 2008Projectstestx64x64Debugtestx64.exe.</font><br style="font-style:italic <font style="font-style:italic INFO: Manifest Definition Identity is (null).</font><br style="font-style:italic <font style="font-style:italic
INFO: Reference:
Microsoft.VC90.DebugCRT,processorArchitecture="amd64",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8"</font><br style="font-style:italic <font style="font-style:italic INFO:
Resolving reference
Microsoft.VC90.DebugCRT,processorArchitecture="amd64",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8".</font><br style="font-style:italic <font style="font-style:italic INFO: Resolving reference for ProcessorArchitecture amd64.</font><br style="font-style:italic <font style="font-style:italic INFO: Resolving reference for culture Neutral.</font><br style="font-style:italic <font style="font-style:italic INFO: Applying Binding Policy.</font><br style="font-style:italic <font style="font-style:italic INFO: No publisher policy found.</font><br style="font-style:italic <font style="font-style:italic INFO: No binding policy redirect found.</font><br style="font-style:italic <font style="font-style:italic INFO: Begin assembly probing.</font><br style="font-style:italic <font style="font-style:italic INFO: Did not find the assembly in WinSxS.</font><br style="font-style:italic <font style="font-style:italic
INFO: Attempt to probe manifest at
C:WindowsassemblyGAC_64Microsoft.VC90.DebugCRT9.0.21022.8__1fc8b3b9a1e18e3bMicrosoft.VC90.DebugCRT.DLL.</font><br style="font-style:italic <font style="font-style:italic INFO: Attempt to probe manifest at H:Visual Studio 2008Projectstestx64x64DebugMicrosoft.VC90.DebugCRT.DLL.</font><br style="font-style:italic <font style="font-style:italic
INFO: Attempt to probe manifest at H:Visual Studio
2008Projectstestx64x64DebugMicrosoft.VC90.DebugCRT.MANIFEST.</font><br style="font-style:italic <font style="font-style:italic
INFO: Attempt to probe manifest at H:Visual Studio
2008Projectstestx64x64DebugMicrosoft.VC90.DebugCRTMicrosoft.VC90.DebugCRT.DLL.</font><br style="font-style:italic <font style="font-style:italic
INFO: Attempt to probe manifest at H:Visual Studio
2008Projectstestx64x64DebugMicrosoft.VC90.DebugCRTMicrosoft.VC90.DebugCRT.MANIFEST.</font><br style="font-style:italic <font style="font-style:italic INFO: Did not find manifest for culture Neutral.</font><br style="font-style:italic <font style="font-style:italic INFO: End assembly probing.</font><br style="font-style:italic <font style="font-style:italic
ERROR: Cannot resolve reference
Microsoft.VC90.DebugCRT,processorArchitecture="amd64",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8".</font><br style="font-style:italic <font style="font-style:italic ERROR: Activation Context generation failed.</font><br style="font-style:italic <font style="font-style:italic End Activation Context Generation.</font>
<font style="font-weight:bold <font size=4><font style="" face=Arial>Edit:
</font></font></font>
<font size=4><font style="" face=Arial><font size=2><font style="" face=Arial>I
compared my project setting with the sample projects provided with
Visual Studio. I found a work-around for this problem (but not a
perfect solution). In the project property page under "Configuration
Properties --> C/C++ --> Code Generation" I changed "Runtime
Library" from "Multi-threaded Debug <font style="font-weight:bold DLL</font> (/MDd)" to "Multi-threaded Debug (/MTd)".
Seems
that the runtime for debugging isnt installed. I havent installed the
platform SDK, just plain Visual Studio 2008 so maybe the arent
installed.</font></font></font></font>
<font style="font-size:28px" color="#ff6666 this is some related topic. He described a situation when trying to develop 64bit programs
But I encountered nearly the same question when Im developing a 32bit program.
how to solve it?
</font>
<hr size="1" align="left" width="25% no mistakes
View the full article