delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/03/06/08:48:46

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-Id: <3.0.6.32.20000306134617.0098ac40@vengeance>
X-Sender: jules AT vengeance
X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.6 (32)
Date: Mon, 06 Mar 2000 13:46:17 +0000
To: cygwin AT sourceware DOT cygnus DOT com
From: Julian Hall <jules AT acris DOT co DOT uk>
Subject: Linking with MySQL client libs, stdcall fns
Mime-Version: 1.0

I'm currently trying to link with the MySQL client libraries
to connect to a MySQL server running on my LAN.  I have downloaded
the Win32 .dll & .lib file from MySQL's home page (http://www.mysql.org/),
but have found a strange problem with
actually linking with these libraries.

The functions defined in the libraries use the stdcall convention (they are
called, for example, '_mysql_connect AT 16').  The header files that I am
including declare the functions using the macro 'STDCALL' which isn't being
redeclared from the <windows.h> include file which defines it (I ensured
this by adding a #ifndef STDCALL...#endif around the part of mysql.h that
declares STDCALL.

This attribute is apparently being ignored by the compiler, as the output
from gcc is attempting to link to '_mysql_connect', according to 'nm'.

The declaration of the _mysql_connect function, when preprocessed with gcc
-E, looks like this:

MYSQL * __attribute__ ((stdcall))  mysql_connect(MYSQL *mysql, const char
*host, const char *user, const char *passwd);

Does anyone have any ideas what's going on?

Could you please reply to my e-mail address, as I am not subscribed to the
list because I receive e-mail through my work address and my employer
'discourages' the use of mailing lists.


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


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