c语言用ODBC访问access时编译错误,全是头文件的错误,实在是搞不明白,请各位大牛大虾们帮小弟一把阿,急!!~~~~~~~~
#include <sql.h> #include <sqlext.h> #include <sqltypes.h> //#include <odbcinst.h> #include <sqlucode.h> #include <stdio.h>
#include <string.h> #include <stdlib.h>
main()
{
………………
}
Compiling... odbc.c f:\microsoft visual studio\vc98\include\sqltypes.h(114) : error C2061: syntax error : identifier 'SQLHWND' f:\microsoft visual studio\vc98\include\sqltypes.h(114) : error C2059: syntax error : ';' f:\microsoft visual studio\vc98\include\sqltypes.h(252) : error C2061: syntax error : identifier 'DWORD' f:\microsoft visual studio\vc98\include\sqltypes.h(253) : error C2061: syntax error : identifier 'Data2' f:\microsoft visual studio\vc98\include\sqltypes.h(253) : error C2059: syntax error : ';' f:\microsoft visual studio\vc98\include\sqltypes.h(254) : error C2061: syntax error : identifier 'Data3' f:\microsoft visual studio\vc98\include\sqltypes.h(254) : error C2059: syntax error : ';' f:\microsoft visual studio\vc98\include\sqltypes.h(255) : error C2061: syntax error : identifier 'Data4' f:\microsoft visual studio\vc98\include\sqltypes.h(255) : error C2059: syntax error : ';' f:\microsoft visual studio\vc98\include\sqltypes.h(255) : error C2059: syntax error : '[' f:\microsoft visual studio\vc98\include\sqltypes.h(256) : error C2059: syntax error : '}' f:\microsoft visual studio\vc98\include\sqlext.h(1678) : error C2146: syntax error : missing ')' before identifier 'hwnd' f:\microsoft visual studio\vc98\include\sqlext.h(1678) : error C2081: 'SQLHWND' : name in formal parameter list illegal f:\microsoft visual studio\vc98\include\sqlext.h(1678) : error C2061: syntax error : identifier 'hwnd' f:\microsoft visual studio\vc98\include\sqlext.h(1678) : error C2059: syntax error : ';' f:\microsoft visual studio\vc98\include\sqlext.h(1678) : error C2059: syntax error : ',' f:\microsoft visual studio\vc98\include\sqlext.h(1684) : error C2059: syntax error : ')' f:\microsoft visual studio\vc98\include\sqlext.h(2009) : error C2143: syntax error : missing '{' before '__stdcall' f:\microsoft visual studio\vc98\include\sqlext.h(2010) : error C2143: syntax error : missing '{' before '__stdcall' f:\microsoft visual studio\vc98\include\sqlext.h(2026) : error C2143: syntax error : missing ';' before '*' f:\microsoft visual studio\vc98\include\sqlext.h(2026) : error C2059: syntax error : '*' f:\microsoft visual studio\vc98\include\sqlext.h(2027) : error C2061: syntax error : identifier 'dwFlags' f:\microsoft visual studio\vc98\include\sqlext.h(2027) : error C2059: syntax error : ';' f:\microsoft visual studio\vc98\include\sqlext.h(2029) : error C2061: syntax error : identifier 'WCHAR' f:\microsoft visual studio\vc98\include\sqlext.h(2030) : error C2143: syntax error : missing '{' before '*' f:\microsoft visual studio\vc98\include\sqlext.h(2031) : error C2059: syntax error : '}' f:\microsoft visual studio\vc98\include\sqlext.h(2033) : error C2061: syntax error : identifier 'WCHAR' f:\microsoft visual studio\vc98\include\sqlext.h(2034) : error C2143: syntax error : missing '{' before '*' f:\microsoft visual studio\vc98\include\sqlext.h(2035) : error C2059: syntax error : '}' f:\microsoft visual studio\vc98\include\sqlext.h(2037) : error C2059: syntax error : '}' f:\microsoft visual studio\vc98\include\sqlext.h(2038) : error C2143: syntax error : missing '{' before '__stdcall' f:\microsoft visual studio\vc98\include\sqlucode.h(270) : error C2146: syntax error : missing ')' before identifier 'hwnd' f:\microsoft visual studio\vc98\include\sqlucode.h(270) : error C2081: 'SQLHWND' : name in formal parameter list illegal f:\microsoft visual studio\vc98\include\sqlucode.h(270) : error C2061: syntax error : identifier 'hwnd' f:\microsoft visual studio\vc98\include\sqlucode.h(270) : error C2059: syntax error : ';' f:\microsoft visual studio\vc98\include\sqlucode.h(270) : error C2059: syntax error : ',' f:\microsoft visual studio\vc98\include\sqlucode.h(276) : error C2059: syntax error : ')' f:\microsoft visual studio\vc98\include\sqlucode.h(627) : error C2146: syntax error : missing ')' before identifier 'hwnd' f:\microsoft visual studio\vc98\include\sqlucode.h(627) : error C2081: 'SQLHWND' : name in formal parameter list illegal f:\microsoft visual studio\vc98\include\sqlucode.h(627) : error C2061: syntax error : identifier 'hwnd' f:\microsoft visual studio\vc98\include\sqlucode.h(627) : error C2059: syntax error : ';' f:\microsoft visual studio\vc98\include\sqlucode.h(627) : error C2059: syntax error : ',' f:\microsoft visual studio\vc98\include\sqlucode.h(633) : error C2059: syntax error : ')' Error executing cl.exe.
odbc.obj - 43 error(s), 1 warning(s)