[unixODBC-dev] ODBC & Windows

Corwin Joy cjoy at houston.rr.com
Sun Aug 8 19:48:02 BST 2004


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

Under windows you need to #include windows.h
before you #include sql.h.
So,  in the cross-platform database template library that I wrote we
have #includes which look like this:

#ifdef  WIN32
#ifdef WIN32
         #ifndef DTL_USE_MFC
                 #include <windows.h>
         #else
                 #include <afx.h>
         #endif
#endif
#endif
#include <sql.h>
#include <sqlext.h>


to run on both windows (with or without MFC) and Unix flavors. 





More information about the unixODBC-dev mailing list