C++Builder 程序员博客
20 Jul
c:\program files\microsoft visual studio\vc98\include\winbase.h(4761) : error C2061: syntax error : identifier 'INT'
c:\program files\microsoft visual studio\vc98\include\winbase.h(4769) : error C2061: syntax error : identifier 'INT'
c:\program files\microsoft visual studio\vc98\include\winbase.h(4873) : error C2061: syntax error : identifier 'INT'
c:\program files\microsoft visual studio\vc98\include\winbase.h(4882) : error C2061: syntax error : identifier 'INT'
c:\program files\microsoft visual studio\vc98\include\commdlg.h(541) : error C2501: 'INT' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\commdlg.h(541) : error C2501: 'nSizeMax' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\oaidl.h(446) : error C2146: syntax error : missing ';' before identifier 'intVal'
c:\program files\microsoft visual studio\vc98\include\oaidl.h(446) : error C2501: 'INT' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\oaidl.h(446) : error C2501: 'intVal' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\oaidl.h(452) : error C2143: syntax error : missing ';' before '*'
c:\program files\microsoft visual studio\vc98\include\oaidl.h(452) : error C2501: 'INT' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\oaidl.h(452) : error C2501: 'pintVal' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\oaidl.h(519) : error C2146: syntax error : missing ';' before identifier 'intVal'
c:\program files\microsoft visual studio\vc98\include\oaidl.h(519) : error C2501: 'INT' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\oaidl.h(519) : error C2501: 'intVal' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\oaidl.h(526) : error C2143: syntax error : missing ';' before '*'
c:\program files\microsoft visual studio\vc98\include\oaidl.h(526) : error C2501: 'INT' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\oaidl.h(526) : error C2501: 'pintVal' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\oaidl.h(912) : error C2061: syntax error : identifier 'INT'
c:\program files\microsoft visual studio\vc98\include\oaidl.h(1294) : error C2061: syntax error : identifier 'INT'
c:\program files\microsoft visual studio\vc98\include\oaidl.h(3258) :
c:\program files\microsoft visual studio\vc98\include\oaidl.h(5162) : error C2061: syntax error : identifier 'INT'
c:\program files\microsoft visual studio\vc98\include\oaidl.h(6733) : error C2061: syntax error : identifier 'INT'
c:\program files\microsoft visual studio\vc98\include\oaidl.h(6742) : error C2061: syntax error : identifier 'INT'
c:\program files\microsoft visual studio\vc98\include\oaidl.h(6802) : error C2061: syntax error : identifier 'INT'
c:\program files\microsoft visual studio\vc98\include\oaidl.h(6811) : error C2061: syntax error : identifier 'INT'
c:\program files\microsoft visual studio\vc98\include\oleauto.h(61) : error C2143: syntax error : missing ';' before '__stdcall'
c:\program files\microsoft visual studio\vc98\include\oleauto.h(61) : error C2370: 'INT' : redefinition; different storage class
c:\program files\microsoft visual studio\vc98\include\lzexpand.h(31) : see declaration of 'INT'
c:\program files\microsoft visual studio\vc98\include\oleauto.h(63) : error C2143: syntax error : missing ';' before '__stdcall'
c:\program files\microsoft visual studio\vc98\include\oleauto.h(63) : error C2370: 'INT' : redefinition; different storage class
c:\program files\microsoft visual studio\vc98\include\lzexpand.h(31) : see declaration of 'INT'
c:\program files\microsoft visual studio\vc98\include\oleauto.h(76) : error C2143: syntax error : missing ';' before '__stdcall'
c:\program files\microsoft visual studio\vc98\include\oleauto.h(76) : fatal error C1003: error count exceeds 100; stopping compilation
执行 cl.exe 时出错.
Creating browse info file…
BSCMAKE: error BK1506 : cannot open file '.\Debug\p1.sbr': No such file or directory
执行 bscmake.exe 时出错.
shaohao.exe - 1 error(s), 0 warning(s)
这个错误困扰了我很久,,set.h pl.h两个头文件和pl.cpp set.cpp
INT,区分大小写,最好加一个定义
typedef int INT;
另外,不知道你这个cl是哪里来的。对于C++Builder的程序,可以下载Borland C++ Compiler
cl是VC中的编译器
winc的程序,在Microsoft Visual C++ 6.0运行,加入#define WIN32_LEAN_AND_MEAN
#include <windows.h> 后
还是出现这个错误!
Compiling…
pl.cpp
c:\program files\microsoft visual studio\vc98\include\winbase.h(4761) : error C2061: syntax error : identifier 'INT'
c:\program files\microsoft visual studio\vc98\include\winbase.h(4769) : error C2061: syntax error : identifier 'INT'
c:\program files\microsoft visual studio\vc98\include\winbase.h(4873) : error C2061: syntax error : identifier 'INT'
c:\program files\microsoft visual studio\vc98\include\wingdi.h(3210) : error C2143: syntax error : missing ',' before '*'
c:\program files\microsoft visual studio\vc98\include\wingdi.h(3210) : error C2059: syntax error : '*'
c:\program files\microsoft visual studio\vc98\include\wingdi.h(3404) : error C2061: syntax error : identifier 'INT'
c:\program files\microsoft visual studio\vc98\include\wingdi.h(3584) : error C2143: syntax error : missing ',' before '*'
c:\program files\microsoft visual studio\vc98\include\wingdi.h(3584) : error C2059: syntax error : '*'
c:\program files\microsoft visual studio\vc98\include\wingdi.h(3585) : error C2143: syntax error : missing ',' before '*'
c:\program files\microsoft visual studio\vc98\include\wingdi.h(3585) : error C2059: syntax error : '*'
c:\program files\microsoft visual studio\vc98\include\winuser.h(6459) : error C2143: syntax error : missing ',' before '*'
set.cpp
c:\program files\microsoft visual studio\vc98\include\winbase.h(4761) : error C2061: syntax error : identifier 'INT'
c:\program files\microsoft visual studio\vc98\include\winbase.h(4769) : error C2061: syntax error : identifier 'INT'
c:\program files\microsoft visual studio\vc98\include\winbase.h(4873) : error C2061: syntax error : identifier 'INT'
c:\program files\microsoft visual studio\vc98\include\winbase.h(4882) : error C2061: syntax error : identifier 'INT'
c:\program files\microsoft visual studio\vc98\include\wingdi.h(2677) : error C2143: syntax error : missing ',' before '*'
c:\program files\microsoft visual studio\vc98\include\wingdi.h(2677) : error C2059: syntax error : '*'
c:\program files\microsoft visual studio\vc98\include\wingdi.h(3210) : error C2143: syntax error : missing ',' before '*'
c:\program files\microsoft visual studio\vc98\include\wingdi.h(3210) : error C2059: syntax error : '*'
c:\program files\microsoft visual studio\vc98\include\wingdi.h(3404) : error C2061: syntax error : identifier 'INT'
c:\program files\microsoft visual studio\vc98\include\wingdi.h(3584) : error C2143: syntax error : missing ',' before '*'
执行 cl.exe 时出错.
shaohao2.exe - 1 error(s), 0 warning(s)
贴代码。