delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/04/27/22:25:16

From: montanaro AT crd DOT ge DOT com (Skip Montanaro)
Subject: Re: Help! Problems linking against Win32 API...
27 Apr 1998 22:25:16 -0700 :
Message-ID: <9804271756.AA23575.cygnus.gnu-win32@porsche>
Reply-To: montanaro AT crd DOT ge DOT com
To: gnu-win32 AT cygnus DOT com

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 AT crd DOT ge DOT com, 518 387 6792)
(skip AT calendar DOT com, 518 372 5583)
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019