List:MySQL++« Previous MessageNext Message »
From:Zahroof Mohamed Date:November 17 2004 7:16am
Subject:Fwd: RELEASE: v1.7.21
View as plain text  
Looks like I haven't been forwarding my messages to the MySQL++ mailing list.

I modified some things in version 1.7.21 and now I'm able to run my
test application, having compiled and built everything with GCC 3.4.2.
This is on a Win2K system, with MySQL 4.1.4-gamma. The only problem I
had with 1.7.21 is that I cannot use it as a dll as the vtable in
class row could not be imported. The linker asked me to read the
documentation on ld --enable-auto-import, but I couldn't find any
documentation on the subject. Therefore, I had to build a static file
and link that against my test application.

I had to make the following mods to the files in 1.7.21:

in connection.h, 
// #include <query.h>   // I commented out this line
...
...
namespace mysqlpp{
class Query;               // added this line

In connection.cc,

#include <query.h>
...
...
  bool suc = !(mysql_shutdown(&mysql, SHUTDOWN_DEFAULT));  // line
100. The  comma after &mysql was missing and I added SHUTDOWN_DEFAULT

In compare.h:
...
...
  bool operator () (const Row& cmp1) const 
    {return MysqlCmp<BinaryPred, const char*>::func(
			MysqlCmp<BinaryPred, const char*>::cmp2, cmp1[this->index]);}

// this->index is required. Explained in GCC documentation on Name look up

In sql_query.h:

...
#include <custom.h>

That's it.

By the way, when I did all this and ran my test app, I could reuse my
old query object by query.reset() as Chris Frey had mentioned in a
previous mail.

Now if someone could point me to the __enable-auto-import
documentation, I would be extremely grateful.

Z




---------- Forwarded message ----------
From: Zahroof Mohamed <zahroofm@stripped>
Date: Tue, 16 Nov 2004 23:02:47 -0500
Subject: Re: RELEASE: v1.7.21
To: Warren Young <mysqlpp@stripped>


On Tue, 16 Nov 2004 10:40:18 -0700, Warren Young <mysqlpp@stripped> wrote:
> Zahroof Mohamed wrote:
> > I've been using the GCC 3.4.2 for some time now with MingW Studio on
> > Windows 2000. Because of the circular dependancy between Connection
> > and Query, I could not use 1.7.21.
>
> Are you saying that an earlier version of MySQL++ worked with GCC 3.4.2,
> or that your switch to GCC 3.4.2 broke all MySQL++ versions?  If the
> former, please be explicit about which version worked.
>

Currently I am using GCC 3.4.2 with MySQL++ 1.7.17, Win 2K, MySQL
4.1.4-gamma. After downloading GCC 3.4.2, I had to recompile the
MySQL++ libraries for my old test apps to work .



> > In the header file compare1.hh, in the declaration  of class
> > MysqlcprCStr, line 29, index is not defined. I added
> > protected:
> >    unsigned int index;
> > to this class to solve the problem.
>
> Incorrect fix.  index is a member element of the parent class.  I don't
> know why GCC cannot see it.  I've had to add explicit qualifiers to
> MySQL++ before to work around these things.  This one looks like a GCC
> bug to me.
>

Yup, I missed the fact that class MysqlCmprCStr was derived from
MysqlCmp that contains index as a member element. I think I've fixed
the problem correctly now by referring to index explicitly as
MysqlCmp::index
Library builds ok with this fix. I haven't used this routine though in
my test app.

> > My compiler showed several warnings - one for all the #pragma stuff
> > that was added for the benefit of windows users using Visual C++. I
> > had to comment out all the #pragma stuff to get rid of the warnings.
>
> Instead of hacking those pragmas out -- which are necessary on some
> platforms -- why don't you send me a patch to platform.h (nee'
> mysql++-windows.hh) that will allow the MinGW GCC to skip those pragmas?
>  MySQL++ doesn't move forward on platforms I don't use without patches.
>

I would love to help, but have no clue as to how to go about doing it.
Could you show me some kind of example how you would go about doing
such a thing? I'm new to this type of stuff.

> > With GCC 3.4.2, I also got the warning that <strstream> had been
> > deprecated and to use <sstream> instead.
>
> This has been fixed since 1.7.19.
>

I'll try out 1.7.19 then and see how that goes.

Thanks,
Z
Thread
Fwd: RELEASE: v1.7.21Zahroof Mohamed17 Nov
  • Re: Fwd: RELEASE: v1.7.21Warren Young18 Nov
    • Re: Fwd: RELEASE: v1.7.21Zahroof Mohamed18 Nov
      • Re: Fwd: RELEASE: v1.7.21Warren Young19 Nov