This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Help! Problems linking against Win32 API...



Last week I asked about problems linking my application with calls to
ODBC functions in my code.  After much wailing and gnashing of teeth I
finally figured out that the magic __stdcall keyword needs to be
present in the function prototypes to cause the compiler to
appropriately "decorate" the calls.  The solution in my case was
simply to define WIN32 to the compiler and everything worked fine.
Here are the magic lines in sqltypes.h that turn everything on:

    #ifdef WIN32
    #define SQL_API  __stdcall
    #else
    #define SQL_API
    #endif

I see a mention in the FAQ about defining _WIN32, but didn't see it in 
any of the B19 include files.

Can whoever is in charge of the FAQ please update the question
entitled "How do I use Win32 API calls?" to include a reference to
defining WIN32 for ODBC?

-- 
Skip Montanaro
(montanaro@crd.ge.com, 518 387 6792)
(skip@calendar.com, 518 372 5583)
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]