7 messages in com.mysql.lists.plusplusRE: Core dumped!
FromSent OnAttachments
Charles Iliya Krempeaux19 Jul 2001 01:27 
Charles Iliya Krempeaux19 Jul 2001 19:48 
Carlos Moreno20 Jul 2001 07:30 
Leonard Thornton20 Jul 2001 09:46 
Sander Pilon21 Jul 2001 07:47 
Carlos Moreno21 Jul 2001 08:04 
Sander Pilon21 Jul 2001 08:48 
Subject:RE: Core dumped!
From:Sander Pilon (san@3dnews.net)
Date:07/21/2001 07:47:38 AM
List:com.mysql.lists.plusplus

Charles Iliya Krempeaux wrote:

Hello,

On 20 Jul 2001 09:30:16 +0800, cool@21cn.com wrote:

what language do you use? PHP or other?

I'm using C++ with the MySQL++ library.

My problem is that I get a core dump from simply calling a constructor of the `Connection' class; using C++ code like the following:

Connection con("database", "hostname", "username", "password");

I myself have never been able to run a C++ program that accesses MySQL -- I asked here no less than half a dozen times, but nobody seemed to know what the problem was.

I've not had problems with the Linux version - however we've had our share with serious problems with the MSVC and FreeBSD versions, with and without using STLPort.

I ended up doing a C++ wrapper of the C API -- those worked like a charm. I did a separate module with the C code, compile that one with C++, and then create a C++ file with a class that wraps that one -- I finally link with the C API library (-lmysqlclient). After I did it, I realized that I didn't have to create a separate module, and I could have simply done:

....

I ended up rewriting a subset of MySQL++, in a way that works with STLPort, and compiled on Linux, FreeBSD and Win2000/MS Visual C++.

MySQL++ provides a pretty good API, but its implementation could have been better, with regards to compiler compatibility (For example: There really is no need for different versions for Borland, Visual C, Linux AND FreeBSD.)

-S