[unixODBC-dev] ODBC & Windows

Alf C Stockton alf at stockton.co.za
Mon Aug 2 21:53:17 BST 2004

On the basis that the sample that came in the Tutotial in the docs of unixODBC 
was supposidely created originally in Windows I attempted to recompile it 
under Windows XP using mingw with gcc version 3.2
However I get the following errors :-
C:\dev>gcc odbc.c -o odbc -lodbc
In file included from c:/Dev-Cpp/include/sql.h:13,
                   from odbc.c:9:
c:/Dev-Cpp/include/sqltypes.h:50: parse error before "SQLHWND"
c:/Dev-Cpp/include/sqltypes.h:154: parse error before "DWORD"
c:/Dev-Cpp/include/sqltypes.h:156: parse error before "Data3"
c:/Dev-Cpp/include/sqltypes.h:157: parse error before "Data4"
c:/Dev-Cpp/include/sqltypes.h:158: parse error before '}' token
In file included from odbc.c:10:
c:/Dev-Cpp/include/sqlext.h:1184: parse error before "SQLHWND"
c:/Dev-Cpp/include/sqlext.h:1203: parse error before "ODBCGetTryWaitValue"
c:/Dev-Cpp/include/sqlext.h:1204: parse error before "ODBCSetTryWaitValue"
c:/Dev-Cpp/include/sqlext.h:1207: parse error before "TraceReturn"
c:/Dev-Cpp/include/sqlext.h:1208: parse error before "TraceVersion"
In file included from c:/Dev-Cpp/include/sqlext.h:1214,
                   from odbc.c:10:
c:/Dev-Cpp/include/sqlucode.h:38: parse error before "SQLHWND"
c:/Dev-Cpp/include/sqlucode.h:39: parse error before "SQLHWND"

The apparent problem is that HWND & DWORD are not defined, therefore my question 
is what else should I #include to resolve this problem?

BTW The source I am using is C not C++.


Alf Stockton	www.stockton.co.za

If this is timesharing, give me my share right now.

More information about the unixODBC-dev mailing list