dbTalk Databases Forums  

Re : RE: 'long long' not supported

mailing.database.mysql-plusplus mailing.database.mysql-plusplus


Discuss Re : RE: 'long long' not supported in the mailing.database.mysql-plusplus forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
np@sfr.fr
 
Posts: n/a

Default Re : RE: 'long long' not supported - 07-21-2005 , 04:15 AM






Just for info, I had the same KIND OF problem on windows platform event w=
ith 2.0b2 while trying to integrate MYSQL server sources (4.11/4.12a/5.02=
b), MYSQL++(1.7/2.0) and JASPER (free JPEG2000 Library).
I saw then the =
following type redefinition problems :
- MYSQL sources defines typedef l=
ong long my_longlong =3D> OK
- MYSQL++ defines typedef __int64 longlong=

- JASPER defines typedef long long longlong

When you try to remove th=
e definition on MYSQL++ side, you can go on compiling further but you rea=
ch SQLString::longlong types.

MYSQL++ team, do you think it could be i=
nteresting 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.



Quote:
------=
---- Message d'origine -----------
Exp=E9diteur : "Purcell Dan Cliffor=
d \(UMR-Student\)" <dcpty9 (AT) umr (DOT) edu
A : "MySQL++ Mailing List" <pluspl=
us (AT) lists (DOT) mysql.com
CC :
Date : Wed, 20 Jul 2005 23:45:28 -0500
=
Objet : RE: 'long long' not supported
Warren Young said:

If y=
ou don't need this feature, you can #define NO_LONG_LONGS, but this
wi=
ll 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
=
Quote:
even sure if the fixes are in beta2. You may have to use the repositor=
y
version.

Using the #define NO_LONG_LONGS got rid of that pro=
blem, but how can I get around the problem of all of these redefinitions =
which result from this change.
Quote:
g++ -g -Wall -W -I/usr/local/inc=
lude -I/usr/include/mysql -c -o test.o test.cpp
In file included fro=
m /usr/local/include/query.h:49,
from /usr/local/incl=
ude/mysql++.h:45,
from test.cpp:6:
/usr/local/incl=
ude/coldata.h:262: redefinition of `template <class Str
longlong mysq=
lpp:perator+ (mysqlpp::ColData_Tmpl<Str>, long int)'
/usr/local/incl=
ude/coldata.h:255: `template <class Str> long int
mysqlpp:perator+ (=
mysqlpp::ColData_Tmpl<Str>, long int)' previously
declared here
/us=
r/local/include/coldata.h:262: redefinition of `template <class Str
l=
onglong mysqlpp:perator+ (long int, mysqlpp::ColData_Tmpl<Str>)'
/us=
r/local/include/coldata.h:255: `template <class Str> long int
mysqlpp:=
perator+ (long int, mysqlpp::ColData_Tmpl<Str>)' previously
declared=
here
/usr/local/include/coldata.h:262: redefinition of `template <cla=
ss Str
longlong mysqlpp:perator- (mysqlpp::ColData_Tmpl<Str>, long =
int)'
/usr/local/include/coldata.h:255: `template <class Str> long int=

mysqlpp:perator- (mysqlpp::ColData_Tmpl<Str>, long int)' previously=

declared here
/usr/local/include/coldata.h:262: redefinition of `t=
emplate <class Str
longlong mysqlpp:perator- (long int, mysqlpp::Co=
lData_Tmpl<Str>)'
/usr/local/include/coldata.h:255: `template <class S=
tr> long int
mysqlpp:perator- (long int, mysqlpp::ColData_Tmpl<Str>)=
' previously
declared here

... the same error is given for the=
other operators * , / , % , & , ^ , | , << ,

... then these e=
rrors

In file included from /usr/local/include/manip.h:47,
=
from /usr/local/include/vallist.h:31,
f=
rom /usr/local/include/row.h:34,
from /usr/local/incl=
ude/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 te=
st.cpp:6:
/usr/local/include/coldata.h: In instantiation of `mysqlpp::=
ColData_Tmpl<mysqlpp::const_string>':
/usr/local/include/datetime.h:14=
7: instantiated from here
/usr/local/include/coldata.h:196: `mysqlpp=
::ColData_Tmpl<Str>:perator
longlong () const [with Str =3D mysqlpp:=
:const_string]' has already been
declared in `mysqlpp::ColData_Tmpl<my=
sqlpp::const_string>'
/usr/local/include/coldata.h:200: `mysqlpp::ColD=
ata_Tmpl<Str>:perator
ulonglong () const [with Str =3D mysqlpp::cons=
t_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/loc=
al/include/connection.h:39,
from /usr/local/include/q=
uery.h:50,
from /usr/local/include/mysql++.h:45,
=
from test.cpp:6:
/usr/local/include/coldata.h: In inst=
antiation of `mysqlpp::ColData_Tmpl<string>':
/usr/local/include/manip=
..h:171: instantiated from here
/usr/local/include/coldata.h:196: `my=
sqlpp::ColData_Tmpl<Str>:perator
longlong () const [with Str =3D str=
ing]' has already been declared in
`mysqlpp::ColData_Tmpl<string>'
=
/usr/local/include/coldata.h:200: `mysqlpp::ColData_Tmpl<Str>:perator
=
Quote:
ulonglong () const [with Str =3D string]' has already been declared in=

`mysqlpp::ColData_Tmpl<string>'
make: *** [test.o] Error 1

t=
hanks for your consideration,
-Dan

--
MySQL++ Mailing List=

For list archives: http://lists.mysql.com/plusplus
To unsubscribe: =
http://lists.mysql.com/plusplus?unsu...) sfr (DOT) fr


Nicolas P=
ERRIN


--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
  #2  
Old   
Warren Young
 
Posts: n/a

Default Re: Re : RE: 'long long' not supported - 07-21-2005 , 07:53 PM






np (AT) sfr (DOT) fr wrote:

Quote:
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
That should only cause a problem when you say "using namespace mysqlpp".
If you are having this problem, you shouldn't hoist these definitions
up into the global namespace; fully qualify symbols instead:

mysqlpp::longlong x;

Quote:
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 ?
It's not necessary, and I'm sure there's a lot of code out there that
depends on this typedef. We've broken a lot of things in MySQL++ 2.0,
but only where necessary. This isn't such a case.

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.