delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/02/28/04:58:54

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Sat, 28 Feb 2004 01:59:09 +0100
From: "Gerrit P. Haase" <gp AT familiehaase DOT de>
Reply-To: "Gerrit @ cygwin" <cygwin AT cygwin DOT com>
Organization: Esse keine toten Tiere
Message-ID: <15954380034.20040228015909@familiehaase.de>
To: Fabrice Marchal <fmarchal AT inf DOT ethz DOT ch>
CC: "Gerrit @ cygwin" <cygwin AT cygwin DOT com>
Subject: Re: Crash of mysql under cygwin with g++ 3.3.1
In-Reply-To: <403B7DC5.7020600@inf.ethz.ch>
References: <Pine DOT LNX DOT 4 DOT 44 DOT 0311280144210 DOT 25293-100000 AT piz DOT ethz DOT ch> <1256769927 DOT 20040104213024 AT familiehaase DOT de> <403B7DC5 DOT 7020600 AT inf DOT ethz DOT ch>
MIME-Version: 1.0
X-IsSubscribed: yes

Hallo Fabrice,

Am Dienstag, 24. Februar 2004 um 17:37 schriebst du:

> Hallo Gerrit,

> Thanks for your help. I would like to ask you a few questions:

> 1) If I use your mysql-4.0.17 libraries, that is if I link my code 
> against your libmysqlclient.a
> then my code works OK. On the other hand, then it requires 
> cygmysqlclient.dll also: what is
> that library exactly? Is it the equivalent of mySQL.dll which is 
> included in the mysql for windows?

Yes, the .dll is the runtime and the .a lib is used by the linker to
resolve the symbols.

> 2) I have now identified the bug, or at least what causes it: here is
> small example that
> crashes when using cygwin-1-5-7.1, MYSQL 4.0.18 and GCC3.3.1 (G++):

> #include <mysql.h>
> #include <iostream>
> using namespace std;

> class Connection{
>    MYSQL* mqlh;
> public:
>  Connection(){
>    mqlh = mysql_init( NULL );
>    cout << "OK" << endl;
>  }
> };

> int main( int argc, char** args ){
>    Connection* con = new Connection();
>    // crashes here
> }

> As you can see, it seems that something is really wrong. It seems to be
> caused by new()
> since removing the mysql_init() from the new() call seems to work.
> I have to mention that I link only against -lmySQL which is provided in
> the mysql for
> windows distro. Maybe that is the problem (i.e. it was build from older
> cygwin releases)

> As I would like to ship a "clean" version, I don't know what to do. 
> Normally, people
> would install mysql-for-win, then install my code plus just the cygwin DLL.

Obviously the official MySQL binary from mysql.com doesn't work...
Why don't you provide a MySQL client library compiled by yourself?
Or you may fetch the binaries from my site and take the .dll from this
package and ship it in addition to your application?


Gerrit
-- 
=^..^=



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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