dbTalk Databases Forums  

'long long' not supported

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


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



Reply
 
Thread Tools Display Modes
  #1  
Old   
Purcell, Dan Clifford \
 
Posts: n/a

Default 'long long' not supported - 07-20-2005 , 12:45 PM






I am getting the following compiler errors, and I was wondering if there =
was a way to get around the unsupported 'long long.'
=20
g++ -g -Wall -W -pedantic-errors -I/usr/local/include =
-I/usr/include/mysql -c -o test.o test.cpp
In file included from /usr/local/include/defs.h:34,
from /usr/local/include/query.h:47,
from /usr/local/include/mysql++.h:45,
from test.cpp:4:
/usr/include/mysql/mysql.h:111: ISO C++ does not support `long long'
In file included from /usr/local/include/query.h:47,
from /usr/local/include/mysql++.h:45,
from test.cpp:4:
/usr/local/include/defs.h:53: ISO C++ does not support `long long'
/usr/local/include/defs.h:55: ISO C++ does not support `long long'
In file included from /usr/local/include/stream2string.h:32,
from /usr/local/include/datetime.h:35,
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:4:
/usr/include/g++-3/sstream:260: default argument given for parameter 3
of `streampos stringbuf::seekoff (long long int, ios::seek_dir, int =3D
3)'
/usr/include/g++-3/sstream:83: after previous specification in
`streampos stringbuf::seekoff (long long int, ios::seek_dir, int =3D 3)'
/usr/include/g++-3/sstream:278: default argument given for parameter 2
of `streampos stringbuf::seekpos (long long int, int =3D 3)'
/usr/include/g++-3/sstream:84: after previous specification in
`streampos stringbuf::seekpos (long long int, int =3D 3)'
make: *** [test.o] Error 1

thank you for your consideration,
-Dan

--
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: 'long long' not supported - 07-20-2005 , 05:13 PM






Purcell, Dan Clifford (UMR-Student) wrote:
Quote:
/usr/include/mysql/mysql.h:111: ISO C++ does not support `long long'
The error is correct: "long long" is an extension to the langauge. It's
no doubt arising because you're turning on the pedantic error flag,
which is being extra strict about the language it will support.

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.

Personally, I'd reconsider using -pedantic-errors for all compiles.
Turning such warning flags on from time to time can be helpful in
finding problems, but a lot of the "errors" compilers complain about in
this sort of mode are just plain silly.

--
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
  #3  
Old   
Purcell, Dan Clifford \
 
Posts: n/a

Default RE: 'long long' not supported - 07-20-2005 , 11:46 PM



Warren Young said:
=20
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.
=20
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. =20
=20
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: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 `template <class Str>
longlong mysqlpp:perator+ (long int, mysqlpp::ColData_Tmpl<Str>)'
/usr/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 <class 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 `template <class Str>
longlong mysqlpp:perator- (long int, mysqlpp::ColData_Tmpl<Str>)'
/usr/local/include/coldata.h:255: `template <class Str> long int
mysqlpp:perator- (long int, mysqlpp::ColData_Tmpl<Str>)' previously
declared here

.... the same error is given for the other operators * , / , % , & , ^ , =
Quote:
, << ,
=20
.... then these errors
=20
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>:perator
longlong () const [with Str =3D mysqlpp::const_string]' has already been
declared in `mysqlpp::ColData_Tmpl<mysqlpp::const_string>'
/usr/local/include/coldata.h:200: `mysqlpp::ColData_Tmpl<Str>:perator
ulonglong () const [with Str =3D 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>:perator
longlong () const [with Str =3D string]' has already been declared in
`mysqlpp::ColData_Tmpl<string>'
/usr/local/include/coldata.h:200: `mysqlpp::ColData_Tmpl<Str>:perator
ulonglong () const [with Str =3D 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?unsu...ie.nctu.edu.tw



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

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



Purcell, Dan Clifford (UMR-Student) wrote:

Quote:
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.
Those are the known problems I spoke of. Use the repository version of
MySQL++. Or, give up on your pedantic error flag!

--
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
  #5  
Old   
Purcell, Dan Clifford \
 
Posts: n/a

Default RE: 'long long' not supported - 07-21-2005 , 10:12 PM



I gave up on the pedantic error flag, and I was still getting those =
errors. I will try the repository version. Thank you for your =
assistance.
=20
-Dan

--
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.