Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined reference to `mysql_init' #7

Open
yixuan0719 opened this issue Sep 24, 2019 · 0 comments
Open

undefined reference to `mysql_init' #7

yixuan0719 opened this issue Sep 24, 2019 · 0 comments

Comments

@yixuan0719
Copy link

I try to make the src code on “CentOS Linux release 7.6.1810 (Core) ” and pop the errors below:
what can i do to resolve these error?

make[2]: 进入目录“/home/juan/openvpn-mysql-auth-0.0.2/tests”
/bin/sh ../libtool --tag=CC --mode=link gcc -g -O2 -g -Wall -Werror -L../src -o testplugin testplugin.o ../src/.libs/libopenvpn-mysql-auth.a
libtool: link: gcc -g -O2 -g -Wall -Werror -o testplugin testplugin.o -L../src ../src/.libs/libopenvpn-mysql-auth.a
../src/.libs/libopenvpn-mysql-auth.a(am_mysql.o): In function create_expandable_variable_list': /home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:109: undefined reference to mysql_real_escape_string'
/home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:113: undefined reference to mysql_real_escape_string' ../src/.libs/libopenvpn-mysql-auth.a(am_mysql.o): In function am_mysql_prepare_mysql':
/home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:160: undefined reference to mysql_init' /home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:166: undefined reference to mysql_options'
/home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:170: undefined reference to mysql_real_connect' /home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:171: undefined reference to mysql_error'
/home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:171: undefined reference to mysql_errno' ../src/.libs/libopenvpn-mysql-auth.a(am_mysql.o): In function _am_mysql_simple_query':
/home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:207: undefined reference to mysql_query' /home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:215: undefined reference to mysql_store_result'
/home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:235: undefined reference to mysql_num_rows' /home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:240: undefined reference to mysql_free_result'
/home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:223: undefined reference to mysql_field_count' /home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:225: undefined reference to mysql_affected_rows'
/home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:211: undefined reference to mysql_error' /home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:211: undefined reference to mysql_errno'
/home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:229: undefined reference to mysql_error' /home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:229: undefined reference to mysql_errno'
../src/.libs/libopenvpn-mysql-auth.a(am_mysql.o): In function am_mysql_simple_query': /home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:268: undefined reference to mysql_close'
/home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:268: undefined reference to mysql_close' ../src/.libs/libopenvpn-mysql-auth.a(am_mysql.o): In function _am_mysql_query_return_row_0':
/home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:289: undefined reference to mysql_query' /home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:297: undefined reference to mysql_store_result'
/home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:315: undefined reference to mysql_num_rows' /home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:328: undefined reference to mysql_num_fields'
/home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:334: undefined reference to mysql_fetch_row' /home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:341: undefined reference to mysql_fetch_lengths'
/home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:355: undefined reference to mysql_free_result' /home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:305: undefined reference to mysql_field_count'
/home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:293: undefined reference to mysql_error' /home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:293: undefined reference to mysql_errno'
/home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:311: undefined reference to mysql_error' /home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:311: undefined reference to mysql_errno'
/home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:338: undefined reference to mysql_error' /home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:338: undefined reference to mysql_errno'
../src/.libs/libopenvpn-mysql-auth.a(am_mysql.o): In function am_mysql_query_return_row_0': /home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:383: undefined reference to mysql_close'
/home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:383: undefined reference to mysql_close' ../src/.libs/libopenvpn-mysql-auth.a(am_mysql.o): In function _am_mysql_handle_pf_rules_do_single_query':
/home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:600: undefined reference to mysql_query' /home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:608: undefined reference to mysql_store_result'
/home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:626: undefined reference to mysql_num_rows' /home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:684: undefined reference to mysql_free_result'
/home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:604: undefined reference to mysql_error' /home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:604: undefined reference to mysql_errno'
/home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:639: undefined reference to mysql_num_fields' /home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:616: undefined reference to mysql_field_count'
/home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:622: undefined reference to mysql_error' /home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:622: undefined reference to mysql_errno'
/home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:645: undefined reference to mysql_fetch_row' /home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:652: undefined reference to mysql_fetch_lengths'
/home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:649: undefined reference to mysql_error' /home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:649: undefined reference to mysql_errno'
../src/.libs/libopenvpn-mysql-auth.a(am_mysql.o): In function am_mysql_handle_auth_user_pass_verify': /home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:837: undefined reference to mysql_close'
/home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:837: undefined reference to mysql_close' /home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:837: undefined reference to mysql_close'
../src/.libs/libopenvpn-mysql-auth.a(am_mysql.o): In function am_mysql_library_init': /home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:846: undefined reference to mysql_server_init'
../src/.libs/libopenvpn-mysql-auth.a(am_mysql.o): In function am_mysql_library_end': /home/juan/openvpn-mysql-auth-0.0.2/src/am_mysql.c:851: undefined reference to mysql_server_end'
collect2: error: ld returned 1 exit status
make[2]: *** [testplugin] 错误 1
make[2]: 离开目录“/home/juan/openvpn-mysql-auth-0.0.2/tests”
make[1]: *** [all-recursive] 错误 1
make[1]: 离开目录“/home/juan/openvpn-mysql-auth-0.0.2”
make: *** [all] 错误 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant