Hi,
g++ -c -o mysqlpp_mystring.o -I. -fPIC -DPIC -pthread
-I/usr/include/mysql -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
-fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64
-mtune=generic ./lib/mystring.cpp
./lib/mystring.cpp: In member function ‘int
mysqlpp::String::compare(const std::string&) const’:
./lib/mystring.cpp:67: erreur: no matching function for call to
‘max(unsigned int, size_t)’
./lib/mystring.cpp: In member function ‘int
mysqlpp::String::compare(const char*) const’:
./lib/mystring.cpp:81: erreur: no matching function for call to
‘max(unsigned int, size_t)’
This is probably because unsigned int is 32 bits while size_t is 64 bits.
Here is a little/trivial patch,
but this is probably not the better solution :
--- lib/mystring.h.orig 2008-05-13 20:47:56.000000000 +0200
+++ lib/mystring.h 2008-05-13 20:47:08.000000000 +0200
@@ -144,7 +144,7 @@
typedef const char value_type;
/// \brief Type of "size" integers
- typedef unsigned int size_type;
+ typedef size_t size_type;
/// \brief Type of iterators
typedef const char* const_iterator;
Any suggestion (I would like to push the new version to Fedora 9
repository).
Regards
Remi.
| Thread |
|---|
| • Build issue, v3.0.3, gcc 4.3, x86_64 (with patch proposal) | Remi Collet | 13 May |
| • Re: Build issue, v3.0.3, gcc 4.3, x86_64 (with patch proposal) | Warren Young | 13 May |
| • Re: Build issue, v3.0.3, gcc 4.3, x86_64 (with patch proposal) | Remi Collet | 13 May |
| • Re: Build issue, v3.0.3, gcc 4.3, x86_64 (with patch proposal) | Jonathan Wakely | 13 May |
| • Re: Build issue, v3.0.3, gcc 4.3, x86_64 (with patch proposal) | Warren Young | 13 May |