tags:

views:

101

answers:

2

We have a C++ MFC project that won't build under a fresh-install of Visual Studio 2008 Standard. I've tried:

  • Revo Uninstaller to remove all previous versions of Visual Studio
  • Fresh install of Visual Studio 2008 Standard (all options selected)

This is running Windows XP SP2. I don't have the file afxglobals.h, which to my knowledge should live in %PROGRAMFILES%\Microsoft Visual Studio 9.0\VC\afxmfc\include.

Hence, when I try to compile my source that #includes <afxglobals.h>, the build fails saying it cannot find the file.

I'm thinking this may be another corrupt installation, but I've already tried re-installing before. Any ideas?

A: 

Try this

  1. Remove Visual C++ from Visual Studio (or uninstall the whole Visual Studio if you want to be safe)
  2. go to %PROGRAMFILES%\Microsoft Visual Studio 9.0\ and delete the VC folder (if you uninstalled the whole VisualStudio, delete everything here)
  3. clean your "%temp%" folder and turn off any service/software that interfere with the installer, such as anti-virus
  4. Reinstall, install service pack and security patch,
Sheng Jiang 蒋晟
The thumbnail of your picture is creepy. Is that Kim Jung-Il?
ceretullis
No, that's a painting of me, size adjusted to fit here of cause. The original painting was 4" by 5".
Sheng Jiang 蒋晟
A: 

Installing Visual C++ 2008 Feature Pack should help.

Paulius