作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我不断收到此消息。我也使用 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/
我不断收到此消息。我也使用 Windows,所以在正确执行命令时遇到了一些麻烦。 对“mysql_get_client_info”的 undefined reference 根据我在谷歌上搜索的结果,
我正在尝试学习C! 我已经在线查看了大量文档和教程,我正在尝试根据 this website 获取 MySQL 客户端版本的一些简单输出。 . 但是我不明白是什么导致了我收到以下错误消息: undef
我正在尝试编译以下内容: #include #include #include #include int main(void) { puts("!!!Hello World!!!");
我是一名优秀的程序员,十分优秀!