List:MySQL++« Previous MessageNext Message »
From:np Date:July 21 2005 9:14am
Subject:Re : RE: 'long long' not supported
View as plain text  
Just for info, I had the same KIND OF problem on windows platform event with 2.0b2 while
trying to integrate MYSQL server sources (4.11/4.12a/5.02b), MYSQL++(1.7/2.0) and JASPER
(free JPEG2000 Library).
I saw then the following type redefinition problems :
- MYSQL sources defines typedef long long my_longlong => OK
- MYSQL++ defines typedef __int64 longlong
- JASPER defines typedef long long longlong

When you try to remove the definition on MYSQL++ side, you can go on compiling further but
you reach SQLString::longlong types.

MYSQL++ team, do you think it could be interesting and not destructing regarding MYSQL++
API to redfines 64 bits types to a name specific to MYSQL++(ex mysqlpp_longlong) as it is
done in MYSQL sources C API to avoid naming conflicts ?


NP.



> ---------- Message d'origine -----------
> Expéditeur : "Purcell Dan Clifford \(UMR-Student\)" <dcpty9@stripped>
> A : "MySQL++ Mailing List" <plusplus@stripped>
> CC : 
> Date : Wed, 20 Jul 2005 23:45:28 -0500
> Objet : RE: 'long long' not supported
> Warren Young said:
>  
> If you don't need this feature, you can #define NO_LONG_LONGS, but this
> will only affect MySQL++, not the C API.  Also, there were problems with
> this mode until very recently in the MySQL++ v2.0 development; I'm not
> even sure if the fixes are in beta2.  You may have to use the repository
> version.
>  
> Using the #define NO_LONG_LONGS got rid of that problem, but how can I get around the
> problem of all of these redefinitions which result from this change.  
>  
> g++ -g -Wall -W -I/usr/local/include -I/usr/include/mysql   -c -o test.o test.cpp
> In file included from /usr/local/include/query.h:49,
>                  from /usr/local/include/mysql++.h:45,
>                  from test.cpp:6:
> /usr/local/include/coldata.h:262: redefinition of `template <class Str>
> longlong mysqlpp::operator+ (mysqlpp::ColData_Tmpl<Str>, long int)'
> /usr/local/include/coldata.h:255: `template <class Str> long int
> mysqlpp::operator+ (mysqlpp::ColData_Tmpl<Str>, long int)' previously
> declared here
> /usr/local/include/coldata.h:262: redefinition of `template <class Str>
> longlong mysqlpp::operator+ (long int, mysqlpp::ColData_Tmpl<Str>)'
> /usr/local/include/coldata.h:255: `template <class Str> long int
> mysqlpp::operator+ (long int, mysqlpp::ColData_Tmpl<Str>)' previously
> declared here
> /usr/local/include/coldata.h:262: redefinition of `template <class Str>
> longlong mysqlpp::operator- (mysqlpp::ColData_Tmpl<Str>, long int)'
> /usr/local/include/coldata.h:255: `template <class Str> long int
> mysqlpp::operator- (mysqlpp::ColData_Tmpl<Str>, long int)' previously
> declared here
> /usr/local/include/coldata.h:262: redefinition of `template <class Str>
> longlong mysqlpp::operator- (long int, mysqlpp::ColData_Tmpl<Str>)'
> /usr/local/include/coldata.h:255: `template <class Str> long int
> mysqlpp::operator- (long int, mysqlpp::ColData_Tmpl<Str>)' previously
> declared here
> 
> ...  the same error is given for the other operators * , / , % , & , ^ , | ,
> << , >>
>  
> ... then these errors
>  
> In file included from /usr/local/include/manip.h:47,
>                  from /usr/local/include/vallist.h:31,
>                  from /usr/local/include/row.h:34,
>                  from /usr/local/include/result.h:38,
>                  from /usr/local/include/connection.h:39,
>                  from /usr/local/include/query.h:50,
>                  from /usr/local/include/mysql++.h:45,
>                  from test.cpp:6:
> /usr/local/include/coldata.h: In instantiation of
> `mysqlpp::ColData_Tmpl<mysqlpp::const_string>':
> /usr/local/include/datetime.h:147:   instantiated from here
> /usr/local/include/coldata.h:196: `mysqlpp::ColData_Tmpl<Str>::operator
> longlong () const [with Str = mysqlpp::const_string]' has already been
> declared in `mysqlpp::ColData_Tmpl<mysqlpp::const_string>'
> /usr/local/include/coldata.h:200: `mysqlpp::ColData_Tmpl<Str>::operator
> ulonglong () const [with Str = mysqlpp::const_string]' has already been
> declared in `mysqlpp::ColData_Tmpl<mysqlpp::const_string>'
> In file included from /usr/local/include/vallist.h:31,
>                  from /usr/local/include/row.h:34,
>                  from /usr/local/include/result.h:38,
>                  from /usr/local/include/connection.h:39,
>                  from /usr/local/include/query.h:50,
>                  from /usr/local/include/mysql++.h:45,
>                  from test.cpp:6:
> /usr/local/include/coldata.h: In instantiation of
> `mysqlpp::ColData_Tmpl<string>':
> /usr/local/include/manip.h:171:   instantiated from here
> /usr/local/include/coldata.h:196: `mysqlpp::ColData_Tmpl<Str>::operator
> longlong () const [with Str = string]' has already been declared in
> `mysqlpp::ColData_Tmpl<string>'
> /usr/local/include/coldata.h:200: `mysqlpp::ColData_Tmpl<Str>::operator
> ulonglong () const [with Str = string]' has already been declared in
> `mysqlpp::ColData_Tmpl<string>'
> make: *** [test.o] Error 1
> 
> thanks for your consideration,
> -Dan
> 
> -- 
> MySQL++ Mailing List
> For list archives: http://lists.mysql.com/plusplus
> To unsubscribe:    http://lists.mysql.com/plusplus?unsub=1
> 
> 

Nicolas PERRIN

Thread
Re : RE: 'long long' not supportednp21 Jul
  • Re: Re : RE: 'long long' not supportedWarren Young22 Jul