如何正确安装VS2008用于基于x64编程? [英] How to properly setup VS2008 for x64 programing?

查看:986
本文介绍了如何正确安装VS2008用于基于x64编程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在64位的win7,我装了VS2008和x64编译工具。我用一个简单的Hello World控制台程序测试。这两个x86和x64版本被编译无措。这两个x86版本的调试和Release颠覆正常工作。该版本的x64版本的作品也没关系。然而,调试x64版本的总是引发并排端错误。这似乎是调试运行时无法找到。

On x64 win7, I installed VS2008 and x64 compile tools. I was testing it with a simple "hello world" console program. Both x86 and x64 versions were compiled flawless. Both Debug and Release subversions of the x86 version works fine. The release x64 version works fine too. However, the Debug x64 version always raises the side-by-side error. It seems like the debug runtime cannot be found.

有人建议安装调试运行时REDIST。这让我吃惊:请问x64的调试运行时应该已经来与VS2008安装为一体的x86版本

Someone suggest to install the Debug runtime redist. That surprises me: does the x64 debug runtime should already come with the VS2008 installation as the x86 version?

非常感谢!

@ sj1900一些64位编译器组件都是可选的上一个VS安装。这是值得一试,他们已经全部安装完毕。 这里是截图:

@sj1900 "Some of the x64 compiler components are optional on a VS installation. It's worth checking that they have all been installed." here is the screenshots:

我没有看到任何进一步的选择这里。没有amd64_microsoft.vc90.debugcrt在WINSXS在所有。奇怪的问题。

I did not see any further options here. There is no amd64_microsoft.vc90.debugcrt in the winSxS at all. Strange problem.

推荐答案

在头部刮伤和测试时间,我终于估计这是一个VS2008安装错误,被几个网上提到证实。

After hours of head scratching and testing, I finally reckon that is a VS2008 installer bug, confirmed by several online references.

如果一个人通过的修改功能,安装了VS2008的的64位编译器工具的在第一时间,但安装了64位工具的以后安装程序,错误会显示:所有的x64调试运行时间和NODEBUG OpenMP运行时将丢失。重新安装不会修复此问题。

If one installed the vs2008 without the x64 compiler tool at the first time but installed the x64 tools later via the modification feature of the installer, the bug will show up: all the x64 debug runtimes and the nodebug openMP runtime will be missing. Reinstall will not fix this problem.

我试过很多方法,建议所有在互联网上:安装所有修补程序,ATL更新,更新到SP1或安装VCredist ...没有什么工作

I tried lots of methods suggested all over the internet: install all the hotfixes, ATL updates, update to SP1 or install the VCredist ... Nothing works.

我想通了,有两种方法来解决这个问题:

I figured out there are two ways to fix this:

  1. 卸载VS2008完全然后再安装VS2008新鲜与x64的工具选择。

  1. uninstall the VS2008 completely then install the VS2008 again as fresh with the x64 tools selected.

这将是恼人的一些人谁安装了大量的修补程序。最直接的方法就是为建立一个安装程序安装所有这些失踪的运行时间创建porject->其他项目 - >安装项目。然后添加和放大器;合并模块 - >选择所有丢失的运行时间: Microsoft_VC90_OpenMP_x86_x64.msm Microsoft_VC90_DebugOpenMP_x86_x64的.msm Microsoft_VC90_DebugCRT_x86_x64.msm 。 构建和发布解决方案,运行安装程序,然后转到%WINDIR%\ winsxs文件,你应该高兴地看到所有的运行文件夹。然后,你就可以开始调试你的x64程序。 如果妳使用的是VS2008SP1,那么在可能获取有关运行时版本另一个错误。为了避免这种情况,安装SP1的ATL更新之前û开始创建安装程序。

this will be annoying for some person who installed lots of hotfixes. The most straightforward way is to build a installer to install all those missing runtimes: create porject->other projects->setup project. Then add&Merge Module -> select all the missing runtimes: Microsoft_VC90_OpenMP_x86_x64.msm , Microsoft_VC90_DebugOpenMP_x86_x64.msm and Microsoft_VC90_DebugCRT_x86_x64.msm. Build and release the solution, run the installer, then go to %windir%\winsxs, you should happily see all those runtime folders. Then you can start to debug your x64 programs. If u are using VS2008SP1, then u probably get another error about the runtime version. To avoid this, install the ATL update for SP1 before u start to create the installer.

PS:还有很多其他的小麻烦,但不是致命的错误在VS2008其中M $从来没有刻意去解决。因此,从VS2008远离,并尝试VS2010,除非你的项目有特殊的需要,迫使你坚持VC9。

PS: there are lots of other annoying but not fatal bugs in VS2008 which the M$ never bother to fix. Thus stay away from VS2008 and try VS2010, unless your projects have the special need that forces you to stick to VC9.

这篇关于如何正确安装VS2008用于基于x64编程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆