gpt4 book ai didi

mysql - 未定义对 `mysql_get_client_info' 的引用

转载 作者:行者123 更新时间:2023-11-29 18:17:07 25 4
gpt4 key购买 nike

我不断收到此消息。我也使用 Windows,所以在正确执行命令时遇到了一些麻烦。

对“mysql_get_client_info”的 undefined reference

根据我在谷歌上搜索的结果,我没有正确链接。所以我尝试了这个。

gcc *.c -L"C:\Program Files\MySQL\MySQL Server 5.7\lib"

我可以就我做错的事情获得一些帮助吗?

<小时/>

那没有用。我做错了吗?

$ gcc *.c -L"C:\Program Files\MySQL\MySQL Server 5.7\lib" -lmysqlclient
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/client_authentication.obj):(.text$x+0x23): undefined reference to `??2@YAPEAX_K@Z'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/client_authentication.obj):(.text$x+0x23): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `??2@YAPEAX_K@Z'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/client_authentication.obj):(.text$x+0x2e): undefined reference to `__imp_?_Xbad_alloc@std@@YAXXZ'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/client_authentication.obj):(.text$x+0x2e): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `__imp_?_Xbad_alloc@std@@YAXXZ'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/client_authentication.obj):(.text$x+0x61): undefined reference to `??3@YAXPEAX@Z'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/client_authentication.obj):(.text$x+0x61): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `??3@YAXPEAX@Z'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/client_authentication.obj):(.text$x+0x7d): undefined reference to `_CxxThrowException'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/client_authentication.obj):(.text$x+0x7d): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `_CxxThrowException'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/client_authentication.obj):(.xdata[$unwind$?_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAX_K0@Z]+0x10): undefined reference to `__CxxFrameHandler3'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/client_authentication.obj):(.xdata[$unwind$?_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAX_K0@Z]+0x10): relocation truncated to fit: rva32 against undefined symbol `__CxxFrameHandler3'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/client_authentication.obj):(.xdata[$unwind$?catch$1@?0??_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAX_K0@Z@4HA]+0x8): undefined reference to `__CxxFrameHandler3'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/client_authentication.obj):(.xdata[$unwind$?catch$1@?0??_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAX_K0@Z@4HA]+0x8): relocation truncated to fit: rva32 against undefined symbol `__CxxFrameHandler3'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/client_authentication.obj):(.xdata[$unwind$?catch$0@?0??_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAX_K0@Z@4HA]+0xc): undefined reference to `__CxxFrameHandler3'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/client_authentication.obj):(.xdata[$unwind$?catch$0@?0??_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAX_K0@Z@4HA]+0xc): relocation truncated to fit: rva32 against undefined symbol `__CxxFrameHandler3'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/client_authentication.obj):(.rdata[??_7error_category@std@@6B@]+0x10): undefined reference to `_purecall'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/client_authentication.obj):(.rdata[??_7error_category@std@@6B@]+0x18): undefined reference to `_purecall'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/client_authentication.obj):(.data$r+0x0): undefined reference to `??_7type_info@@6B@'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x15): undefined reference to `__security_cookie'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x15): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `__security_cookie'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0xed): undefined reference to `__security_check_cookie'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0xed): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `__security_check_cookie'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0xd): undefined reference to `__security_cookie'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0xd): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `__security_cookie'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x99): undefined reference to `__security_check_cookie'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x99): additional relocation overflows omitted from the output
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0xb): undefined reference to `__security_cookie'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x163): undefined reference to `__security_check_cookie'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0xd): undefined reference to `__security_cookie'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x14a): undefined reference to `__security_check_cookie'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x17): undefined reference to `__security_cookie'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x257): undefined reference to `__security_check_cookie'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0xa): undefined reference to `__security_cookie'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x2f7): undefined reference to `__security_check_cookie'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0xb): undefined reference to `__security_cookie'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x1b7): undefined reference to `__security_check_cookie'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x11): undefined reference to `__security_cookie'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x2fb): undefined reference to `__security_check_cookie'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x10): undefined reference to `__security_cookie'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x72): undefined reference to `__security_check_cookie'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x10): undefined reference to `__security_cookie'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x17c): undefined reference to `__security_check_cookie'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x10): undefined reference to `__security_cookie'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x72): undefined reference to `__security_check_cookie'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x9): undefined reference to `__security_cookie'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x3f): undefined reference to `__security_check_cookie'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0xf3): undefined reference to `__security_check_cookie'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0xd): undefined reference to `__security_cookie'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x248): undefined reference to `__security_check_cookie'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0xd): undefined reference to `__security_cookie'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0xb7): undefined reference to `__security_check_cookie'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0xd): undefined reference to `__security_cookie'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0x121): undefined reference to `__security_check_cookie'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0xd): undefined reference to `__security_cookie'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.text$mn+0xa8): undefined reference to `__security_check_cookie'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.xdata[$unwind$mysql_list_dbs]+0x10): undefined reference to `__GSHandlerCheck'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.xdata[$unwind$mysql_list_tables]+0x10): undefined reference to `__GSHandlerCheck'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.xdata[$unwind$mysql_list_fields]+0x10): undefined reference to `__GSHandlerCheck'
C:\Program Files\MySQL\MySQL Server 5.7\lib/mysqlclient.lib(clientlib.dir/RelWithDebInfo/libmysql.obj):(.xdata[$unwind$mysql_stmt_store_result]+0xc): undefined reference to `__GSHandlerCheck'

最佳答案

链接应用程序时,您需要指定-lmysqlclient-L 标志仅更改库搜索路径;它实际上并不链接到任何库。

关于mysql - 未定义对 `mysql_get_client_info' 的引用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46921964/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com