我在redhat6.4上面想使用mysql做服务器的数据库,遇到了这样的问题

大王叫我来巡山 发布于 2013/08/01 00:05
阅读 1K+
收藏 0
Invoking: GCC C++ Linker
g++  -o "TestLoginSVR"  ./src/AES.o ./src/asio_server.o   -lboost_system -lboost_thread -lmysqlcppconn
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_stmt_errno@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_stmt_init@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_stmt_send_long_data@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_ping@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_errno@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_stmt_store_result@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_next_result@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_get_client_version@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_commit@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_warning_count@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_debug@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_query@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_stmt_prepare@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_stmt_affected_rows@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_options@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_real_query@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_fetch_field@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_affected_rows@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_stmt_error@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_more_results@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_data_seek@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_sqlstate@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_server_init@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_stmt_bind_result@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_real_connect@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_thread_end@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_stmt_num_rows@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_stmt_fetch@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_stmt_bind_param@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_autocommit@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_num_rows@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_server_end@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_stmt_result_metadata@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_stmt_attr_set@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_stmt_sqlstate@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_field_count@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_fetch_field_direct@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_fetch_lengths@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_stmt_field_count@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_store_result@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_close@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_free_result@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_rollback@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_stmt_param_count@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_info@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_init@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_get_server_version@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_num_fields@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_thread_init@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_stmt_data_seek@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_fetch_row@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_ssl_set@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_real_escape_string@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_use_result@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_stmt_execute@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_stmt_close@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_get_server_info@libmysqlclient_18'
/usr/lib/libmysqlcppconn.so: undefined reference to `mysql_error@libmysqlclient_18'
collect2: 错误:ld 返回 1








也不知道是错在哪了,郁闷啊。
加载中
0
MtrS
MtrS
ld  链接错误,可能需要该 makefile ,或者./configure  --help  看配置是否正确
0
1
1泡泡1

rpm -e mysql*

源码安装mysql

0
potal
potal

libmysqlclient在6.4上版本为16,而你的libmysqlcppconn.so需要的版本为18,故发生此错误

降低你的mysql connector/c++的版本为1.1.1可避免此错误

返回顶部
顶部