2 messages in com.mysql.lists.plusplusRE: MySQL++ and gcc3.0
FromSent OnAttachments
Mathieu DESPRIEE18 Jan 2002 11:00 
SCOTTO Yves FTRD/DMI/REN21 Jan 2002 00:51 
Subject:RE: MySQL++ and gcc3.0
From:SCOTTO Yves FTRD/DMI/REN (yves@rd.francetelecom.com)
Date:01/21/2002 12:51:55 AM
List:com.mysql.lists.plusplus

Welcome !! I have the same problem and I gave up ! I use the 2.96 gcc and all is correct

Yves

-----Message d'origine----- De : Mathieu DESPRIEE [mailto:math@transatel.com] Envoye : vendredi 18 janvier 2002 20:01 A : plus@lists.mysql.com Objet : MySQL++ and gcc3.0

Have anybody managed to compile and use the MySQL++ API with gcc3.0 ??

I'm using gcc 3.0.2, and I'm trying to use MySQL++ 1.7.9. I had problems at various stages :

1/ Applying the patch for gcc3.0 was absolutely horrible, patch complaining for each file. There is no indication of how to apply this patch. What's the right way ?

2/ The library doesn't compile at all if I use the option --enable-exception during configuration. I had to walk back to old-style exception to manage to compile the library

3/ The makefile fails to build exmaples. I've got the fooloowing error : make: *** No rule to make target `resetdb.@OBJEXT@', needed by `resetdb@EXEEXT@'. I had to change the makefile to achieve the compilation

4/ Now I'm trying to use the library. My code doesn't compile at all. I've got the following errors : /usr/local/include/result1.hh: In copy constructor `MysqlRes::MysqlRes(const MysqlRes&)': /usr/local/include/result1.hh:159: warning: base class `class const_subscript_container<MysqlRes, MysqlRow, const MysqlRow, unsigned int, int>' should be explicitly initialized in the copy constructor

and :

MySQLManager.c++:41: choosing `std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const char*) [with _Traits = std::char_traits<char>]' over `SQLQuery& operator<<(SQLQuery&, const mysql_ColData<std::string>&)' MySQLManager.c++:41: because worst conversion for the former is better than worst conversion for the latter

This error occurs on the following code lines : Query query = con->query(); query << "show tables";

(directly inspired from the manual !)

Can anybody help me ?

M.D