Cannot #include sql.h or sqlext.h
Posted on 2007-09-28
I am writing an ODBC module for a C++ program using straight Win32 API calls. IntelliSense seems to know all the functions and data types with nothing but windows.h #include'd, but it won't compile like that. When I #include sql.h or sqlext.h, I get a bunch of syntax errors when I try to compile. Missing ; before *, undeclared identifiers, redefinitions, too many initializers, etc. etc. etc. They're definetly coming from the headers, since my project only has a stubbed constructor and destructor at this point.
What is the correct way to include the libraries you need for ODBC functions?