Subject: Re: Help! Problems linking against Win32 API...
From: [email-masked] (Skip Montanaro)

27 Apr 1998 22:25:16 -0700
Message-ID: <9804271756.AA23575.cygnus.gnu-win32@porsche>
Reply-To: [email-masked]
To: [email-masked]

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
([email-masked], 518 387 6792)
([email-masked], 518 372 5583)
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".