问题描述
我试图在 Rust 项目中使用带有 MysqL 功能的 Diesel,但每次编译时都会出现以下错误:
error: linking with `link.exe` Failed: exit code: 1120
|
[Microsoft Visual Studio linker command]
= note: libMysqLclient_sys-2db1a782bcbd4f1d.rlib(client.cc.obj) : error LNK2019: unresolved external symbol ERR_error_string_n referenced in function "int __cdecl cli_establish_ssl(struct MysqL *)" (?cli_establish_ssl@@YahpEAUMysqL@@@Z)
libMysqLclient_sys-2db1a782bcbd4f1d.rlib(viosslfactories.cc.obj) : error LNK2001: unresolved external symbol ERR_error_string_n
[100 more of this]
我已经尝试过以下命令来安装 MysqL 库
vcpkg install libMysqL:x64-windows-static-md
我将 MysqLCLIENT_LIB_DIR
设置为 MysqLclient.lib
文件所在的目录,但仍然出现此错误。
我安装了 Microsoft Visual Studio 2019,用于链接 MysqL C API。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)