当前位置: 技术问答>linux和unix
mysql++ 程序上次编译好好的,这次出错
来源: 互联网 发布时间:2016-06-10
本文导语: #include #include int main() { ... ... } 上次编译的时候还没问题, 这次就出错了, 一摸一样的程序,一行都没改过... [root@localhost zdf]# g++ -Wno-deprecated -L/usr/lib/mysql -lmysqlclient -L/usr/local/lib -lmysql...
#include
#include
int main()
{
...
...
}
上次编译的时候还没问题, 这次就出错了, 一摸一样的程序,一行都没改过...
[root@localhost zdf]# g++ -Wno-deprecated -L/usr/lib/mysql -lmysqlclient -L/usr/local/lib -lmysqlpp -Ilib -I/usr/include/mysl -I/usr/local/include/mysql++ -o test a.cpp -lpthread
In file included from /usr/local/include/mysql++/connection.h:38,
from /usr/local/include/mysql++/mysql++.h:56,
from a.cpp:5:
/usr/local/include/mysql++/common.h:124:28: mysql_version.h: No such file or directory
/usr/local/include/mysql++/common.h:182:20: mysql.h: No such file or directory
In file included from /usr/local/include/mysql++/sql_buffer.h:32,
from /usr/local/include/mysql++/stadapter.h:35,
from /usr/local/include/mysql++/qparms.h:35,
from /usr/local/include/mysql++/query.h:34,
from /usr/local/include/mysql++/mysql++.h:58,
from a.cpp:5:
/usr/local/include/mysql++/type_info.h:83: error: expected `,' or `...' before "bt"
/usr/local/include/mysql++/type_info.h:84: error: ISO C++ forbids declaration of `enum_field_types' with no type
/usr/local/include/mysql++/type_info.h:98: error: `enum_field_types' does not name a type
/usr/local/include/mysql++/type_info.h: In constructor `mysqlpp::mysql_ti_sql_type_info::mysql_ti_sql_type_info()':
/usr/local/include/mysql++/type_info.h:71: error: class `mysqlpp::mysql_ti_sql_type_info' does not have any field named `base_type_'
/usr/local/include/mysql++/type_info.h:77: error: `FIELD_TYPE_NULL' was not declared in this scope
/usr/local/include/mysql++/type_info.h: In constructor `mysqlpp::mysql_ti_sql_type_info::mysql_ti_sql_type_info(const char*, const std::type_info&, int)':
/usr/local/include/mysql++/type_info.h:87: error: class `mysqlpp::mysql_ti_sql_type_info' does not have any field named `base_type_'
/usr/local/include/mysql++/type_info.h:87: error: `bt' was not declared in this scope
/usr/local/include/mysql++/type_info.h:88: error: `flags' was not declared in this scope
/usr/local/include/mysql++/type_info.h: At global scope:
/usr/local/include/mysql++/type_info.h:168: error: expected `)' before "t"
/usr/local/include/mysql++/type_info.h:270: error: `enum_field_types' does not name a type
/usr/local/include/mysql++/type_info.h:304: error: `enum_field_types' has not been declared
/usr/local/include/mysql++/type_info.h:305: error: ISO C++ forbids declaration of `t' with no type
/usr/local/include/mysql++/type_info.h: In member function `const mysqlpp::mysql_type_info mysqlpp::mysql_type_info::base_type() const':
/usr/local/include/mysql++/type_info.h:230: error: 'const class mysqlpp::mysql_ti_sql_type_info' has no member named 'base_type_'
In file included from /usr/local/include/mysql++/stadapter.h:35,
from /usr/local/include/mysql++/qparms.h:35,
from /usr/local/include/mysql++/query.h:34,
from /usr/local/include/mysql++/mysql++.h:58,
from a.cpp:5:
/usr/local/include/mysql++/sql_buffer.h: At global scope:
/usr/local/include/mysql++/sql_buffer.h:71: error: `string_type' is not a member of `mysqlpp::mysql_type_info'
/usr/local/include/mysql++/sql_buffer.h:76: error: `string_type' is not a member of `mysqlpp::mysql_type_info'
/usr/local/include/mysql++/sql_buffer.h: In member function `bool mysqlpp::SQLBuffer::is_string()':
/usr/local/include/mysql++/sql_buffer.h:95: error: `string_type' is not a member of `mysqlpp::mysql_type_info'
In file included from /usr/local/include/mysql++/result.h:35,
from /usr/local/include/mysql++/query.h:36,
from /usr/local/include/mysql++/mysql++.h:58,
from a.cpp:5:
/usr/local/include/mysql++/field.h: At global scope:
/usr/local/include/mysql++/field.h:58: error: expected `,' or `...' before '*' token
/usr/local/include/mysql++/field.h:58: error: ISO C++ forbids declaration of `MYSQL_FIELD' with no type
#include
int main()
{
...
...
}
上次编译的时候还没问题, 这次就出错了, 一摸一样的程序,一行都没改过...
[root@localhost zdf]# g++ -Wno-deprecated -L/usr/lib/mysql -lmysqlclient -L/usr/local/lib -lmysqlpp -Ilib -I/usr/include/mysl -I/usr/local/include/mysql++ -o test a.cpp -lpthread
In file included from /usr/local/include/mysql++/connection.h:38,
from /usr/local/include/mysql++/mysql++.h:56,
from a.cpp:5:
/usr/local/include/mysql++/common.h:124:28: mysql_version.h: No such file or directory
/usr/local/include/mysql++/common.h:182:20: mysql.h: No such file or directory
In file included from /usr/local/include/mysql++/sql_buffer.h:32,
from /usr/local/include/mysql++/stadapter.h:35,
from /usr/local/include/mysql++/qparms.h:35,
from /usr/local/include/mysql++/query.h:34,
from /usr/local/include/mysql++/mysql++.h:58,
from a.cpp:5:
/usr/local/include/mysql++/type_info.h:83: error: expected `,' or `...' before "bt"
/usr/local/include/mysql++/type_info.h:84: error: ISO C++ forbids declaration of `enum_field_types' with no type
/usr/local/include/mysql++/type_info.h:98: error: `enum_field_types' does not name a type
/usr/local/include/mysql++/type_info.h: In constructor `mysqlpp::mysql_ti_sql_type_info::mysql_ti_sql_type_info()':
/usr/local/include/mysql++/type_info.h:71: error: class `mysqlpp::mysql_ti_sql_type_info' does not have any field named `base_type_'
/usr/local/include/mysql++/type_info.h:77: error: `FIELD_TYPE_NULL' was not declared in this scope
/usr/local/include/mysql++/type_info.h: In constructor `mysqlpp::mysql_ti_sql_type_info::mysql_ti_sql_type_info(const char*, const std::type_info&, int)':
/usr/local/include/mysql++/type_info.h:87: error: class `mysqlpp::mysql_ti_sql_type_info' does not have any field named `base_type_'
/usr/local/include/mysql++/type_info.h:87: error: `bt' was not declared in this scope
/usr/local/include/mysql++/type_info.h:88: error: `flags' was not declared in this scope
/usr/local/include/mysql++/type_info.h: At global scope:
/usr/local/include/mysql++/type_info.h:168: error: expected `)' before "t"
/usr/local/include/mysql++/type_info.h:270: error: `enum_field_types' does not name a type
/usr/local/include/mysql++/type_info.h:304: error: `enum_field_types' has not been declared
/usr/local/include/mysql++/type_info.h:305: error: ISO C++ forbids declaration of `t' with no type
/usr/local/include/mysql++/type_info.h: In member function `const mysqlpp::mysql_type_info mysqlpp::mysql_type_info::base_type() const':
/usr/local/include/mysql++/type_info.h:230: error: 'const class mysqlpp::mysql_ti_sql_type_info' has no member named 'base_type_'
In file included from /usr/local/include/mysql++/stadapter.h:35,
from /usr/local/include/mysql++/qparms.h:35,
from /usr/local/include/mysql++/query.h:34,
from /usr/local/include/mysql++/mysql++.h:58,
from a.cpp:5:
/usr/local/include/mysql++/sql_buffer.h: At global scope:
/usr/local/include/mysql++/sql_buffer.h:71: error: `string_type' is not a member of `mysqlpp::mysql_type_info'
/usr/local/include/mysql++/sql_buffer.h:76: error: `string_type' is not a member of `mysqlpp::mysql_type_info'
/usr/local/include/mysql++/sql_buffer.h: In member function `bool mysqlpp::SQLBuffer::is_string()':
/usr/local/include/mysql++/sql_buffer.h:95: error: `string_type' is not a member of `mysqlpp::mysql_type_info'
In file included from /usr/local/include/mysql++/result.h:35,
from /usr/local/include/mysql++/query.h:36,
from /usr/local/include/mysql++/mysql++.h:58,
from a.cpp:5:
/usr/local/include/mysql++/field.h: At global scope:
/usr/local/include/mysql++/field.h:58: error: expected `,' or `...' before '*' token
/usr/local/include/mysql++/field.h:58: error: ISO C++ forbids declaration of `MYSQL_FIELD' with no type
|
貌似mysql++有问题。