This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Linking with MySQL client libs, stdcall fns


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@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@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]