Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
295 views
in Technique[技术] by (71.8m points)

c++ - vs 2008 623 compiler errors

I have a c++ console app that has been doing just fine and upon clean make started throwing compiler errors. Obviously I've redefined or omitted something, but I'm not sure what.

------ Rebuild All started: Project: alpineProbe, Configuration: Release Win32 ------
Deleting intermediate and output files for project 'abc', configuration 'Release|Win32'
Compiling...
wmiTest.cpp
C:Program FilesMicrosoft Visual Studio 9.0VCincludeexcpt.h(60) : error C2065: '_$notnull' : undeclared identifier
C:Program FilesMicrosoft Visual Studio 9.0VCincludeexcpt.h(60) : error C3861: '_Pre1_impl_': identifier not found
C:Program FilesMicrosoft Visual Studio 9.0VCincludeexcpt.h(60) : error C2146: syntax error : missing ')' before identifier '_Deref_pre2_impl_'
C:Program FilesMicrosoft Visual Studio 9.0VCincludeexcpt.h(60) : warning C4229: anachronism used : modifiers on data are ignored
C:Program FilesMicrosoft Visual Studio 9.0VCincludeexcpt.h(64) : error C2059: syntax error : ')'
C:Program FilesMicrosoft Visual Studio 9.0VCincludectype.h(94) : error C2144: syntax error : 'int' should be preceded by ';'
C:Program FilesMicrosoft Visual Studio 9.0VCincludectype.h(94) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

I'm sure it's something obvious, but I don't see it. One other thing, I reloaded the project from a backup copy.

Edit:

Using /showIncludes as suggested by Michael Burr gives the following:

1>Note: including file: c:developmentalpineaccessfinalTokenizer.h
1>Note: including file:  c:developmentalpineaccessfinal	estFunctions.h
1>Note: including file:   c:developmentalpineaccessfinalcurl/curl.h
1>Note: including file:    c:developmentalpineaccessfinalcurlcurlver.h
1>Note: including file:    C:Program FilesMicrosoft Visual Studio 9.0VCincludestdio.h
1>Note: including file:     C:Program FilesMicrosoft Visual Studio 9.0VCincludecrtdefs.h
1>Note: including file:      C:Program FilesMicrosoft Visual Studio 9.0VCincludesal.h
1>Note: including file:       c:program filesmicrosoft visual studio 9.0vcincludecodeanalysissourceannotations.h
1>Note: including file:        C:Program FilesMicrosoft SDKsWindowsv6.0Aincludewindows.h
1>Note: including file:         C:Program FilesMicrosoft SDKsWindowsv6.0Aincludesdkddkver.h
1>Note: including file:         C:Program FilesMicrosoft Visual Studio 9.0VCincludeexcpt.h
1>Note: including file:          C:Program FilesMicrosoft Visual Studio 9.0VCincludecrtdefs.h

Note that there's a circular reference via sourceannotations.h. I see what the problem is, but have no idea how to fix it.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

JaredPar's answer has something to do with it, but you shouldn't have to include sal.h yourself - something's causing the wrong sal.h to be picked up (or another wrong header). <sal.h> should be included by <crtdefs.h> which is included by the standard headers, but clearly the right one isn't being picked up for some reason.

Try using the "/showIncludes" option ("Configuration Properties/C/C++/Advanced/Show Includes" in the IDE's project options) to see what headers are being included from where.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...