Mail Archives: cygwin/1997/01/15/15:31:11
If anyone in interested wxwin port has a sample program linking with
odbc library...
--- On Wed, 15 Jan 1997 12:59:13 +0100 Gunther Ebert
<gunther DOT ebert AT ixos-leipzig DOT de> wrote:
Hi,
it looks like the function prototypes for the ODBC functions are
missing or incorrect. Please check your header files if the
prototypes are there and if
- all functions are declared as _stdcall (_stdcall is hidden in
the WINAPI or STDCALL macros), that means your prototypes have
to look like
int WINAPI func();
You have to do this because the name mangling of _stdcall functions
is different from the one of 'normal' functions.
- there are no parameter types used which are smaller than 4 bytes
because all Win32 API function parameters have to be dword-aligned
and gcc doesn't do this automatically.
Bad prototype:
int WINAPI func(WORD param);
Good prototype:
int WINAPI func(DWORD param);
You have to change all Win32 API parameter types which are smaller
than 4 bytes to DWORD even if the parameter types are actually CHAR
or WORD.
You have to care about this because the total number of bytes passed
as
parameters to a Win32 API function is part of the name mangling of
these functions.
Gunther
Henry Minsky wrote:
>
> I am trying to compile a program on Windows NT which calls the ODBC
> DLL library. There is a library in the gnu-win32 distribution called
> libodbc32.a, but when I add the library on the gcc command line, I
> still get undefined link references for all the ODBC functions. Does
> anyone have any experience linking with the ODBC routines, and have an
> idea what might be the problem?
>
> Thanks,
> Henry
> -
> For help on using this list, send a message to
> "gnu-win32-request AT cygnus DOT com" with one line of text: "help".
-
For help on using this list, send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
---------------End of Original Message-----------------
-------------------------------------
Name: Garry Boyce
E-mail: garp AT opustel DOT opustel DOT com (Garry Boyce)
Date: 12/01/94
Time: 08:46:10
This message was sent by Chameleon
-------------------------------------
-
For help on using this list, send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -