您好,当我尝试编译我的 MySQL 连接代码时,我收到了这些 LNK 错误
1>main.obj : error LNK2028: unresolved token (0A00027D) "extern "C" struct st_mysql * __stdcall mysql_init(struct st_mysql *)" (?mysql_init@@$$J14YGPAUst_mysql@@PAU1@@Z) referenced in function "int __cdecl main(void)" (?main@@$$HYAHXZ)
1>main.obj : error LNK2028: unresolved token (0A0002B9) "extern "C" struct st_mysql * __stdcall mysql_real_connect(struct st_mysql *,char const *,char const *,char const *,char const *,unsigned int,char const *,unsigned int)" (?mysql_real_connect@@$$J232YGPAUst_mysql@@PAU1@PBD111I1I@Z) referenced in function "int __cdecl main(void)" (?main@@$$HYAHXZ)
1>main.obj : error LNK2028: unresolved token (0A0002C8) "extern "C" int __stdcall mysql_query(struct st_mysql *,char const *)" (?mysql_query@@$$J18YGHPAUst_mysql@@PBD@Z) referenced in function "int __cdecl main(void)" (?main@@$$HYAHXZ)
1>main.obj : error LNK2019: unresolved external symbol "extern "C" int __stdcall mysql_query(struct st_mysql *,char const *)" (?mysql_query@@$$J18YGHPAUst_mysql@@PBD@Z) referenced in function "int __cdecl main(void)" (?main@@$$HYAHXZ)
1>main.obj : error LNK2019: unresolved external symbol "extern "C" struct st_mysql * __stdcall mysql_real_connect(struct st_mysql *,char const *,char const *,char const *,char const *,unsigned int,char const *,unsigned int)" (?mysql_real_connect@@$$J232YGPAUst_mysql@@PAU1@PBD111I1I@Z) referenced in function "int __cdecl main(void)" (?main@@$$HYAHXZ)
1>main.obj : error LNK2019: unresolved external symbol "extern "C" struct st_mysql * __stdcall mysql_init(struct st_mysql *)" (?mysql_init@@$$J14YGPAUst_mysql@@PAU1@@Z) referenced in function "int __cdecl main(void)" (?main@@$$HYAHXZ)
先感谢您