Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: cwolfe on January 13, 2015, 11:20:11 pm

Title: error: unknown type name 'ULONG' when sql.h is included in "C" app
Post by: cwolfe on January 13, 2015, 11:20:11 pm
I am reading "Inside ODBC" from Microsoft Press to learn how to perform SQL in my "C" application.  I am writing the first "hello world" ODBC program.  I only added the header file sql.h and compiled and I get several unknown type name errors ULONG, USHORT, PVOID, UCHAR, HWND, DWORD, WORD and BYTE.  As a second test I added, sqlext.h and compiled and I get additional errors.  How do I resolve these errors?
Title: Re: error: unknown type name 'ULONG' when sql.h is included in "C" app
Post by: oBFusCATed on January 14, 2015, 01:37:06 am
By including the proper header.
Read the docs, search the internet or ask in a win32 api support forum.
This one is not such and you're violating the rules of it!
Title: Re: error: unknown type name 'ULONG' when sql.h is included in "C" app
Post by: cwolfe on January 14, 2015, 11:04:58 pm
Solution:  Include windows.h before sql.h