Demo.obj : error LNK2019: 无法解析的外部符号 _mysql_init@4,该符号在函数 "bool __cdecl ConnectDatabase(void"/> Demo.obj : error LNK2019: 无法解析的外部符号 _mysql_init@4,该符号在函数 "bool __cdecl ConnectDatabase(void">

Home  >  Article  >  Database  >  vs2012-win764 + VS2012 + mysql 5.7.4 X86_64 在VS编译不了。

vs2012-win764 + VS2012 + mysql 5.7.4 X86_64 在VS编译不了。

WBOY
WBOYOriginal
2016-06-06 09:44:041212browse

mysqlvs2012

1>Demo.obj : error LNK2019: 无法解析的外部符号 _mysql_server_init@12,该符号在函数 "bool __cdecl ConnectDatabase(void)" (?ConnectDatabase@@YA_NXZ) 中被引用
1>Demo.obj : error LNK2019: 无法解析的外部符号 _mysql_init@4,该符号在函数 "bool __cdecl ConnectDatabase(void)" (?ConnectDatabase@@YA_NXZ) 中被引用
1>Demo.obj : error LNK2019: 无法解析的外部符号 _mysql_free_result@4,该符号在函数 "void __cdecl CloseSql(void)" (?CloseSql@@YAXXZ) 中被引用
1>Demo.obj : error LNK2019: 无法解析的外部符号 _mysql_close@4,该符号在函数 "void __cdecl CloseSql(void)" (?CloseSql@@YAXXZ) 中被引用

包含目录添加了D:\Program Files\MySQL\MySQL Server 5.7\include;
库目录添加了D:\Program Files\MySQL\MySQL Server 5.7\lib;
就是编译错误。
请大神帮帮我, 太纠结了

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn