How to properly setup VS2008 for x64 programing?

后端 未结 2 660
情话喂你
情话喂你 2021-01-23 16:37

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 Deb

相关标签:
2条回答
  • 2021-01-23 16:53

    Some of the x64 compiler components are optional on a VS installation. It's worth checking that they have all been installed.

    0 讨论(0)
  • 2021-01-23 16:56

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

    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.

    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. uninstall the VS2008 completely then install the VS2008 again as fresh with the x64 tools selected.

    2. 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: 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.

    0 讨论(0)
提交回复
热议问题