This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Crash of mysql under cygwin with g++ 3.3.1
- From: Fabrice Marchal <fmarchal at inf dot ethz dot ch>
- To: cygwin at cygwin dot com
- Date: Fri, 28 Nov 2003 01:46:00 +0100 (MET)
- Subject: Crash of mysql under cygwin with g++ 3.3.1
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;
}
--
========================================================================
Fabrice Marchal http://www.inf.ethz.ch/~marchal
fabrice.marchal@ieee.org marchal@inf.ethz.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/