Discussion:
vs 2008 crazy compile errors (desperate!)
(too old to reply)
lcplben
2010-06-16 16:25:34 UTC
Permalink
Hi folks --

I (think I) just reinstalled vs2008 c++ express. This was to fix
strange errors the compiler was claiming to find in stdio.h and other
header files. These compile errors began to appear yesterday: I
figured reinstalling would give me a new copy of everything in the /
include directories.

According to help->about, I installed

Microsoft Visual C++ 2008 91909-152-0000052-60357


The installation package, again according to help->about, included
sp1:

Hotfix for Microsoft Visual C++ 2008 Express Edition with SP1 - ENU
(KB945282)
Hotfix for Microsoft Visual C++ 2008 Express Edition with SP1 - ENU
(KB946040)
Hotfix for Microsoft Visual C++ 2008 Express Edition with SP1 - ENU
(KB946308)
Hotfix for Microsoft Visual C++ 2008 Express Edition with SP1 - ENU
(KB947540)
Hotfix for Microsoft Visual C++ 2008 Express Edition with SP1 - ENU
(KB947789)
Hotfix for Microsoft Visual C++ 2008 Express Edition with SP1 - ENU
(KB948127)

The reinstall did not fix anything, except that now the (newly-
installed, I believe) compiler complains

1>e:\program files\microsoft visual studio 9.0\vc\include\codeanalysis
\sourceannotations.h(19) : error C2054: expected '(' to follow 'd'

(the message is for the line:"typedef _W64 unsigned int size_t;")

and follows with more than 100 similar messages.


What have I done wrong? How can I fix it?

Thanks! I'm totally mystified.

-- ben
Alex Blekhman
2010-06-17 00:29:08 UTC
Permalink
Post by lcplben
What have I done wrong? How can I fix it?
It looks like your include directories are mixed up with other version
of VC++ (maybe older version?) or Platform SDK headers or whatever. I
think you need to uninstall everything and ensure that there are no any
leftovers from the installed products:

1. Uninstall VC++ and all its companion parts (SQL Server, Office dev
tools etc etc).

2. Uninstall Platform SDK, if present.

3. Manually check remaining folders in %ProgramFiles% location. Delete
everything related to VC++.

4. Manually check system and user environment variables for any
leftovers from VC++ and its parts (SQL Server, for example, etc..).
Delete them, if present.

Basically, just remove VC++ as thoroughly as possible without damaging
your system, of course. If you have Windows 7/Vista you can probably
roll back to restore point before VC++ installation. I am not sure about XP.

Then install VC++ again. Here's the useful trick I always do after clean
VC++ install. Go to VC++ include and source folders and set read-only
attribute for all files there. Then, during debugging session if you
accidentally change system file, IDE will warn youand won't let you save
it. Also, go to IDE settings and uncheck "Allow editing of read-only
files; warn when attempt to save" option.

HTH
Alex

Loading...