delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/01/12/07:05:03

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
Message-ID: <40028D41.8080905@inf.ethz.ch>
Date: Mon, 12 Jan 2004 13:04:17 +0100
From: Fabrice Marchal <fmarchal AT inf DOT ethz DOT ch>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624
MIME-Version: 1.0
To: "Gerrit @ cygwin" <cygwin AT cygwin DOT com>
Subject: Re: Crash of mysql under cygwin with g++ 3.3.1
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>
In-Reply-To: <1256769927.20040104213024@familiehaase.de>
X-Enigmail-Version: 0.76.4.0
X-Enigmail-Supports: pgp-inline, pgp-mime
X-Virus-Scanned: by amavisd-new at inf.ethz.ch
X-Spam-Checker-Version: SpamAssassin 2.60 (1.212-2003-09-23-exp) on medoc

Hallo Gerrit,

late reply too.

I guess from your message that you used a version of mysql server
compiled under cygwin. I downloaded and installed 4.0.17 and I still
have the bug with the latest cygwin and that server. I'll try with your
compiled version.
Thanks
Fabrice


Gerrit P. Haase wrote:

>Hallo Fabrice,
>
>late reply, sorry.
>
>Your code snippet works for me with the latest Cygwin gcc-3.3.1 and
>MySQL 4.0.17 which I compiled today and which is available for testing
>here: http://anfaenger.de/cygwin-1.5/mysql/
>
>$ gcc -I/usr/include/mysql \
>    -o mysql mysql.cpp \
>    -L/usr/lib/mysql -lmysqlclient \
>    -L/usr/lib -lstdc++
>
>$ ./mysql
>
>$ g++ -I/usr/include/mysql \
>    -o mysql mysql.cpp \
>    -L/usr/lib/mysql -lmysqlclient
>
>$ ./mysql
>
>No problem here.
>
>
>Am Freitag, 28. November 2003 um 01:46 schriebst du:
>
>  
>
>>I dont know if this is a problem of mysql, g++ or
>>cygwin but the following simple code keeps crashing with g++3.3.1
>>Platform: cygwin-1.5.5, mysql 3.23 (and mysql 4.1 as well).
>>Note that the code does not crash if all the mysql_ calls are
>>made from inside the "main()" block. GDB reports that the crash occurs
>>when returning from the Connection() constructor.
>>The code was working with former g++2.95 under cygwin.
>>    
>>
>
>  
>
>>#include "mysql.h"
>>#include <iostream>
>>    
>>
>
>  
>
>>using namespace std;
>>    
>>
>
>  
>
>>class Connection{
>>  MYSQL *mysql;
>>public:
>>  Connection(){
>>    mysql = mysql_init( NULL );
>>    if( mysql == 0 ){
>>        cerr << "failed to init" << endl;
>>        exit(-1); }
>>    mysql_real_connect( mysql, "", "", "", "test", 3306, NULL, 0);
>>  }
>>};
>>    
>>
>
>  
>
>>int main( int argc, char** args ){
>>    Connection con;
>>}
>>    
>>
>
>
>
>
>HTH,
>Gerrit
>  
>


-- 
========================================================================
Fabrice Marchal           http://www.inf.ethz.ch/~marchal 
fabrice DOT marchal AT ieee DOT org  marchal AT inf DOT ethz DOT ch         +41-(0)1-632-56-79
ETH Zurich, CoLab Computational Laboratory        FAX:+41-(0)1-632-17-03
========================================================================



--
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