paulopmt1
(usa Debian)
Enviado em 12/05/2008 - 16:32h
fiz como vc disse:
g++ -lmysqlpp -I/usr/include/mysql++ $(/usr/bin/mysql_config --libs) $(/usb/bin/mysql_config --cflags) -o simple simple1.cpp
meu mysql_config se encontra em /usr/bin/
e o mysql está funcionando 100%
mais olha o erro que dá agora:
server:/home/web/www/arqs/mysql++-3.0.2/examples# g++ -lmysqlpp -I/usr/include/mysql++ $(/usr/bin/mysql_config --libs) $(/usb/bin/mysql_config --cflags) -o simple simple1.cpp
-bash: /usb/bin/mysql_config: No such file or directory
In file included from /usr/include/mysql++/connection.h:40,
from /usr/include/mysql++/mysql++.h:54,
from printdata.h:31,
from simple1.cpp:29:
/usr/include/mysql++/defs.h:34:19: error: mysql.h: No such file or directory
/usr/include/mysql++/defs.h:66: error: 'MYSQL_FIELD' does not name a type
/usr/include/mysql++/connection.h:142: error: 'my_bool' has not been declared
/usr/include/mysql++/connection.h:159: error: 'my_bool' has not been declared
/usr/include/mysql++/connection.h:355: error: 'st_mysql_options' does not name a type
/usr/include/mysql++/connection.h:422: error: 'my_ulonglong' does not name a type
/usr/include/mysql++/connection.h:433: error: 'my_ulonglong' does not name a type
/usr/include/mysql++/connection.h:483: error: 'mysql_option' has not been declared
/usr/include/mysql++/connection.h:540: error: 'MYSQL' does not name a type
/usr/include/mysql++/connection.h: In member function 'void mysqlpp::Connection::close()':
/usr/include/mysql++/connection.h:167: error: 'mysql_' was not declared in this scope
/usr/include/mysql++/connection.h:167: error: 'mysql_close' was not declared in this scope
/usr/include/mysql++/connection.h: In member function 'const char* mysqlpp::Connection::error()':
/usr/include/mysql++/connection.h:224: error: 'mysql_' was not declared in this scope
/usr/include/mysql++/connection.h:224: error: 'mysql_error' was not declared in this scope
/usr/include/mysql++/connection.h: In member function 'int mysqlpp::Connection::errnum()':
/usr/include/mysql++/connection.h:231: error: 'mysql_' was not declared in this scope
/usr/include/mysql++/connection.h:231: error: 'mysql_errno' was not declared in this scope
/usr/include/mysql++/connection.h: In member function 'int mysqlpp::Connection::refresh(unsigned int)':
/usr/include/mysql++/connection.h:243: error: 'mysql_' was not declared in this scope
/usr/include/mysql++/connection.h:243: error: 'mysql_refresh' was not declared in this scope
/usr/include/mysql++/connection.h: In member function 'int mysqlpp::Connection::ping()':
/usr/include/mysql++/connection.h:256: error: 'mysql_' was not declared in this scope
/usr/include/mysql++/connection.h:256: error: 'mysql_ping' was not declared in this scope
/usr/include/mysql++/connection.h: In member function 'int mysqlpp::Connection::kill(long unsigned int)':
/usr/include/mysql++/connection.h:265: error: 'mysql_' was not declared in this scope
/usr/include/mysql++/connection.h:265: error: 'mysql_kill' was not declared in this scope
/usr/include/mysql++/connection.h: In member function 'std::string mysqlpp::Connection::client_info()':
/usr/include/mysql++/connection.h:273: error: 'mysql_get_client_info' was not declared in this scope
/usr/include/mysql++/connection.h: In member function 'std::string mysqlpp::Connection::host_info()':
/usr/include/mysql++/connection.h:284: error: 'mysql_' was not declared in this scope
/usr/include/mysql++/connection.h:284: error: 'mysql_get_host_info' was not declared in this scope
/usr/include/mysql++/connection.h: In member function 'int mysqlpp::Connection::proto_info()':
/usr/include/mysql++/connection.h:293: error: 'mysql_' was not declared in this scope
/usr/include/mysql++/connection.h:293: error: 'mysql_get_proto_info' was not declared in this scope
/usr/include/mysql++/connection.h: In member function 'std::string mysqlpp::Connection::server_info()':
/usr/include/mysql++/connection.h:301: error: 'mysql_' was not declared in this scope
/usr/include/mysql++/connection.h:301: error: 'mysql_get_server_info' was not declared in this scope
/usr/include/mysql++/connection.h: In member function 'std::string mysqlpp::Connection::stat()':
/usr/include/mysql++/connection.h:312: error: 'mysql_' was not declared in this scope
/usr/include/mysql++/connection.h:312: error: 'mysql_stat' was not declared in this scope
/usr/include/mysql++/fields.h: At global scope:
/usr/include/mysql++/fields.h:41: error: 'Field' was not declared in this scope
/usr/include/mysql++/fields.h:41: error: template argument 2 is invalid
/usr/include/mysql++/fields.h:41: error: template argument 3 is invalid
/usr/include/mysql++/fields.h:54: error: ISO C++ forbids declaration of 'Field' with no type
/usr/include/mysql++/fields.h:54: error: expected ';' before '&' token
/usr/include/mysql++/fields.h:57: error: ISO C++ forbids declaration of 'Field' with no type
/usr/include/mysql++/fields.h:57: error: expected ';' before '&' token
/usr/include/mysql++/fields.h:62: error: expected `;' before 'size_type'
/usr/include/mysql++/fields.h:62: error: 'size_type' does not name a type
/usr/include/mysql++/type_info.h:142: error: expected `)' before 't'
/usr/include/mysql++/type_info.h:148: error: expected ',' or '...' before '&' token
/usr/include/mysql++/type_info.h:148: error: ISO C++ forbids declaration of 'MYSQL_FIELD' with no type
/usr/include/mysql++/type_info.h:299: error: 'enum_field_types' has not been declared
/usr/include/mysql++/type_info.h:340: error: expected `)' before 't'
/usr/include/mysql++/type_info.h:346: error: expected ',' or '...' before '&' token
/usr/include/mysql++/type_info.h:346: error: ISO C++ forbids declaration of 'MYSQL_FIELD' with no type
/usr/include/mysql++/type_info.h: In constructor 'mysqlpp::mysql_type_info::mysql_type_info(int)':
/usr/include/mysql++/type_info.h:348: error: 'f' was not declared in this scope
/usr/include/mysql++/type_info.h:348: error: 'UNSIGNED_FLAG' was not declared in this scope
/usr/include/mysql++/type_info.h:349: error: 'NOT_NULL_FLAG' was not declared in this scope
/usr/include/mysql++/row.h: At global scope:
/usr/include/mysql++/row.h:66: error: expected ',' or '...' before '&' token
/usr/include/mysql++/row.h:67: error: ISO C++ forbids declaration of 'MYSQL_ROW' with no type
/usr/include/mysql++/result.h:77: error: expected `)' before '*' token
/usr/include/mysql++/result.h:94: error: ISO C++ forbids declaration of 'MYSQL_RES' with no type
/usr/include/mysql++/result.h:94: error: expected ';' before '*' token
/usr/include/mysql++/result.h:103: error: expected `;' before 'Row'
/usr/include/mysql++/result.h:133: error: ISO C++ forbids declaration of 'Field' with no type
/usr/include/mysql++/result.h:133: error: expected ';' before '&' token
/usr/include/mysql++/result.h:139: error: expected `;' before 'void'
/usr/include/mysql++/result.h:295: error: ISO C++ forbids declaration of 'Field' with no type
/usr/include/mysql++/result.h:295: error: expected ';' before '&' token
/usr/include/mysql++/result.h:305: error: expected `;' before 'bool'
/usr/include/mysql++/result.h:319: error: ISO C++ forbids declaration of 'MYSQL_RES' with no type
/usr/include/mysql++/result.h:319: error: expected ';' before '*' token
/usr/include/mysql++/result.h: In constructor 'mysqlpp::ResUse::ResUse()':
/usr/include/mysql++/result.h:68: error: class 'mysqlpp::ResUse' does not have any field named 'result_'
/usr/include/mysql++/result.h: In member function 'mysqlpp::Row mysqlpp::ResUse::fetch_row()':
/usr/include/mysql++/result.h:105: error: 'result_' was not declared in this scope
/usr/include/mysql++/result.h:113: error: 'MYSQL_ROW' was not declared in this scope
/usr/include/mysql++/result.h:113: error: expected `;' before 'row'
/usr/include/mysql++/result.h:114: error: 'result_' was not declared in this scope
/usr/include/mysql++/result.h:114: error: 'mysql_fetch_lengths' was not declared in this scope
/usr/include/mysql++/result.h:115: error: 'row' was not declared in this scope
/usr/include/mysql++/result.h:123: error: 'row' was not declared in this scope
/usr/include/mysql++/result.h: In member function 'long unsigned int* mysqlpp::ResUse::fetch_lengths() const':
/usr/include/mysql++/result.h:129: error: 'result_' was not declared in this scope
/usr/include/mysql++/result.h:129: error: 'mysql_fetch_lengths' was not declared in this scope
/usr/include/mysql++/result.h: In member function 'void mysqlpp::ResUse::field_seek(int)':
/usr/include/mysql++/result.h:141: error: 'result_' was not declared in this scope
/usr/include/mysql++/result.h:141: error: 'mysql_field_seek' was not declared in this scope
/usr/include/mysql++/result.h: In member function 'int mysqlpp::ResUse::num_fields() const':
/usr/include/mysql++/result.h:147: error: 'result_' was not declared in this scope
/usr/include/mysql++/result.h:147: error: 'mysql_num_fields' was not declared in this scope
/usr/include/mysql++/result.h: In member function 'void mysqlpp::ResUse::purge()':
/usr/include/mysql++/result.h:163: error: 'result_' was not declared in this scope
/usr/include/mysql++/result.h:164: error: 'mysql_free_result' was not declared in this scope
/usr/include/mysql++/result.h: In member function 'mysqlpp::ResUse::operator bool() const':
/usr/include/mysql++/result.h:192: error: 'result_' was not declared in this scope
/usr/include/mysql++/result.h: In member function 'bool mysqlpp::ResUse::operator==(const mysqlpp::ResUse&) const':
/usr/include/mysql++/result.h:307: error: 'result_' was not declared in this scope
/usr/include/mysql++/result.h:307: error: 'const class mysqlpp::ResUse' has no member named 'result_'
/usr/include/mysql++/result.h: In member function 'bool mysqlpp::ResUse::operator!=(const mysqlpp::ResUse&) const':
/usr/include/mysql++/result.h:314: error: 'result_' was not declared in this scope
/usr/include/mysql++/result.h:314: error: 'const class mysqlpp::ResUse' has no member named 'result_'
/usr/include/mysql++/result.h: At global scope:
/usr/include/mysql++/result.h:355: error: expected `)' before '*' token
/usr/include/mysql++/result.h:400: error: 'my_ulonglong' does not name a type
/usr/include/mysql++/result.h: In member function 'const mysqlpp::Row mysqlpp::Result::fetch_row() const':
/usr/include/mysql++/result.h:378: error: 'result_' was not declared in this scope
/usr/include/mysql++/result.h:386: error: 'MYSQL_ROW' was not declared in this scope
/usr/include/mysql++/result.h:386: error: expected `;' before 'row'
/usr/include/mysql++/result.h:387: error: 'result_' was not declared in this scope
/usr/include/mysql++/result.h:387: error: 'mysql_fetch_lengths' was not declared in this scope
/usr/include/mysql++/result.h:388: error: 'row' was not declared in this scope
/usr/include/mysql++/result.h:396: error: 'row' was not declared in this scope
/usr/include/mysql++/result.h: In member function 'void mysqlpp::Result::data_seek(mysqlpp::uint) const':
/usr/include/mysql++/result.h:411: error: 'result_' was not declared in this scope
/usr/include/mysql++/result.h:411: error: 'mysql_data_seek' was not declared in this scope
/usr/include/mysql++/result.h: In member function 'virtual unsigned int mysqlpp::Result::size() const':
/usr/include/mysql++/result.h:417: error: 'num_rows' was not declared in this scope
/usr/include/mysql++/result.h: In member function 'unsigned int mysqlpp::Result::rows() const':
/usr/include/mysql++/result.h:423: error: 'num_rows' was not declared in this scope
/usr/include/mysql++/result.h: At global scope:
/usr/include/mysql++/result.h:457: error: 'my_ulonglong' does not name a type
/usr/include/mysql++/result.h:458: error: 'my_ulonglong' does not name a type
/usr/include/mysql++/result.h: In member function 'mysqlpp::ResUse& mysqlpp::ResUse::operator=(const mysqlpp::ResUse&)':
/usr/include/mysql++/result.h:627: error: 'const class mysqlpp::ResUse' has no member named 'result_'
/usr/include/mysql++/query.h: At global scope:
/usr/include/mysql++/query.h:700: error: 'my_ulonglong' does not name a type
/usr/include/mysql++/query.h:701: error: 'my_ulonglong' does not name a type
/usr/include/mysql++/query.h: In member function 'void mysqlpp::Query::storein_sequence(Sequence&, const char*)':
/usr/include/mysql++/query.h:732: error: 'MYSQL_ROW' was not declared in this scope
/usr/include/mysql++/query.h:732: error: expected `;' before 'd'
/usr/include/mysql++/query.h:733: error: 'd' was not declared in this scope
/usr/include/mysql++/query.h:735: error: 'd' was not declared in this scope
/usr/include/mysql++/query.h:735: error: 'class mysqlpp::ResUse' has no member named 'raw_result'
/usr/include/mysql++/query.h:735: error: there are no arguments to 'mysql_fetch_lengths' that depend on a template parameter, so a declaration of 'mysql_fetch_lengths' must be available
/usr/include/mysql++/query.h:735: error: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/usr/include/mysql++/query.h: In member function 'void mysqlpp::Query::storein_set(Set&, const char*)':
/usr/include/mysql++/query.h:757: error: 'MYSQL_ROW' was not declared in this scope
/usr/include/mysql++/query.h:757: error: expected `;' before 'd'
/usr/include/mysql++/query.h:758: error: 'd' was not declared in this scope
/usr/include/mysql++/query.h:760: error: 'd' was not declared in this scope
/usr/include/mysql++/query.h:760: error: 'class mysqlpp::ResUse' has no member named 'raw_result'
/usr/include/mysql++/query.h:760: error: there are no arguments to 'mysql_fetch_lengths' that depend on a template parameter, so a declaration of 'mysql_fetch_lengths' must be available
printdata.h: At global scope:
printdata.h:35: error: expected unqualified-id before '&' token
printdata.h:35: error: expected ',' or '...' before '&' token
printdata.h:37: error: ISO C++ forbids declaration of 'parameter' with no type
printdata.h:38: error: variable or field 'print_stock_rows' declared void
printdata.h:38: error: 'StoreQueryResult' is not a member of 'mysqlpp'
printdata.h:38: error: 'res' was not declared in this scope
simple1.cpp: In function 'int main(int, char**)':
simple1.cpp:52: error: no matching function for call to 'mysqlpp::Connection::query(const char [23])'
/usr/include/mysql++/connection.h:199: note: candidates are: mysqlpp::Query mysqlpp::Connection::query()
simple1.cpp:53: error: 'StoreQueryResult' is not a member of 'mysqlpp'
simple1.cpp:53: error: expected `)' before 'res'
simple1.cpp:55: error: 'res' was not declared in this scope
alguma sugestão???
acho que vou usar mysql em C mesmo...