Subject: Re: linking with ODBC library
From: [email-masked] (Keith Gary Boyce )

15 Jan 1997 15:31:11 -0800
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Original-To: [email-masked], Gunther Ebert  <[email-masked]>
X-Mailer: Chameleon ATX 6.0.1, Standards Based IntraNet Solutions, NetManage Inc.
X-Face: ^DH_.wR&WxVpl/6xSwb1zT".+d0hm%R>&bOD<uhG0]C5^PtJ*C-{,0kzA+{][f&K9_svTdC
 WN/[+/~KR3H&Q`>: y{?
X-Priority: 3 (Normal)
Original-Sender: [email-masked]

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 
<[email-masked]> 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
> "[email-masked]" with one line of text: "help".
-
For help on using this list, send a message to
"[email-masked]" with one line of text: "help".

---------------End of Original Message-----------------

-------------------------------------
Name: Garry Boyce
E-mail: [email-masked] (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
"[email-masked]" with one line of text: "help".