mysql++ on fedora

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



There is a problem with the mysql c++ api and fedora
being discussed on the mysql++ mailing list, i thought
i might bring it up here as well.  

The header files and libraries will compile ok, but
when compiling actual code gcc gives up errors.  This
is when we make the examples directory:

Compiling, with the gcc3.3 patch installed I get the
following error
c++ -DHAVE_CONFIG_H -I. -I. -I.. -I../sqlplusint
-I../sqlplusint 
-I/usr/include/mysql  -g -O2 -c custom1.cc
custom1.cc: In function `void populate_stock(stock*,
const MysqlRow&) 
[with
   sql_dummy_type dummy = sql_dummy]':
custom1.cc:10:   instantiated from here
custom1.cc:10: error: ambiguous overload for
'operator=' in 
's->stock::item =
   MysqlRow::operator[](int) const(0)'
/usr/include/c++/3.3.2/bits/basic_string.h:361: error:
candidates are:
   std::basic_string<_CharT, _Traits, _Alloc>& 
std::basic_string<_CharT,
   _Traits, _Alloc>::operator=(const _CharT*) [with
_CharT = char, 
_Traits =
   std::char_traits<char>, _Alloc =
std::allocator<char>]
/usr/include/c++/3.3.2/bits/basic_string.h:364: error:
   std::basic_string<_CharT, _Traits, _Alloc>& 
std::basic_string<_CharT,
   _Traits, _Alloc>::operator=(_CharT) [with _CharT =
char, _Traits =
   std::char_traits<char>, _Alloc =
std::allocator<char>]
make[2]: *** [custom1.o] Error 1
make[2]: Leaving directory 
`/home/netera/hansson/slask/mysql++-1.7.9/examples'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/home/netera/hansson/slask/mysql++-1.7.9'
make: *** [all-recursive-am] Error 2

You can include the header files without a problem but
if you add a query object with the << operator, either
in one of the examples provided or your own code, gcc
returns this error:

mycpp.cpp: In function `int main()':
mycpp.cpp:12: error: ISO C++ says that
`std::basic_ostream<char, _Traits>&
   std::operator<<(std::basic_ostream<char, _Traits>&,
const char*) [with
   _Traits = std::char_traits<char>]' and `SQLQuery&
operator<<(SQLQuery&,
   const mysql_ColData<const_string>&)' are ambiguous
even though the worst
   conversion for the former is better than the worst
conversion for the latter
mycpp.cpp:12: error: ISO C++ says that
`std::basic_ostream<char, _Traits>&
   std::operator<<(std::basic_ostream<char, _Traits>&,
const char*) [with
   _Traits = std::char_traits<char>]' and `SQLQuery&
operator<<(SQLQuery&,
   const mysql_ColData<std::string>&)' are ambiguous
even though the worst
   conversion for the former is better than the worst
conversion for the latter

this is with gcc 3.3.2 and most of the standard fedora
core 1 installation.

Any input anybody can provide is appreciated in advance.

__________________________________
Do you Yahoo!?
Get better spam protection with Yahoo! Mail.
http://antispam.yahoo.com/tools




[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux