error LNK2019: 无法解析的外部符号 freeReplyObject,该符号在函数 "private: void __cdecl ccx::Redis::freeReply(void)"

25 篇文章 0 订阅
16 篇文章 0 订阅
1>redis.obj : error LNK2019: 无法解析的外部符号 freeReplyObject,该符号在函数 "private: void __cdecl ccx::Redis::freeReply(void)" (?freeReply@Redis@ccx@@AEAAXXZ) 中被引用
1>redis.obj : error LNK2019: 无法解析的外部符号 redisConnect,该符号在函数 "public: void __cdecl ccx::Redis::Connect(void)" (?Connect@Redis@ccx@@QEAAXXZ) 中被引用
1>redis.obj : error LNK2019: 无法解析的外部符号 redisFree,该符号在函数 "public: void __cdecl ccx::Redis::disConnect(void)" (?disConnect@Redis@ccx@@QEAAXXZ) 中被引用
1>redis.obj : error LNK2019: 无法解析的外部符号 redisCommand,该符号在函数 "private: void __cdecl ccx::Redis::getString(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?getString@Redis@ccx@@AEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) 中被引用
1>hiredis.lib(hiredis.obj) : error LNK2019: 无法解析的外部符号 _strerror_r,该符号在函数 ___redisSetError 中被引用
1>hiredis.lib(net.obj) : error LNK2001: 无法解析的外部符号 _strerror_r
1>hiredis.lib(net.obj) : error LNK2019: 无法解析的外部符号 _replace_setsockopt,该符号在函数 _redisContextSetTimeout 中被引用

解决办法:不用隐式调用,改用显示调用。

#pragma comment(lib, "hiredis.lib")
#pragma comment(lib, "Win32_Interop.lib")

 

 

1>Win32_Interopd.lib(Win32_ANSI.obj) : error LNK2019: 无法解析的外部符号 __imp_wsprintfW,该符号在函数 InterpretEscSeq 中被引用
1>Win32_Interopd.lib(Win32_EventLog.obj) : error LNK2019: 无法解析的外部符号 __imp_DeregisterEventSource,该符号在函数 "public: void __cdecl RedisEventLog::LogMessage(char const *,unsigned short)" (?LogMessage@RedisEventLog@@QEAAXPEBDG@Z) 中被引用
1>Win32_Interopd.lib(Win32_EventLog.obj) : error LNK2019: 无法解析的外部符号 __imp_RegisterEventSourceA,该符号在函数 "public: void __cdecl RedisEventLog::LogMessage(char const *,unsigned short)" (?LogMessage@RedisEventLog@@QEAAXPEBDG@Z) 中被引用
1>Win32_Interopd.lib(Win32_EventLog.obj) : error LNK2019: 无法解析的外部符号 __imp_ReportEventA,该符号在函数 "public: void __cdecl RedisEventLog::LogMessage(char const *,unsigned short)" (?LogMessage@RedisEventLog@@QEAAXPEBDG@Z) 中被引用
1>Win32_Interopd.lib(Win32_EventLog.obj) : error LNK2019: 无法解析的外部符号 __imp_RegCloseKey,该符号在函数 "public: __cdecl SmartRegistryHandle::~SmartRegistryHandle(void)" (??1SmartRegistryHandle@@QEAA@XZ) 中被引用
1>Win32_Interopd.lib(Win32_EventLog.obj) : error LNK2019: 无法解析的外部符号 __imp_RegCreateKeyA,该符号在函数 "public: void __cdecl RedisEventLog::InstallEventLogSource(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?InstallEventLogSource@RedisEventLog@@QEAAXV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) 中被引用
1>Win32_Interopd.lib(Win32_EventLog.obj) : error LNK2019: 无法解析的外部符号 __imp_RegDeleteKeyA,该符号在函数 "public: void __cdecl RedisEventLog::UninstallEventLogSource(void)" (?UninstallEventLogSource@RedisEventLog@@QEAAXXZ) 中被引用
1>Win32_Interopd.lib(Win32_EventLog.obj) : error LNK2019: 无法解析的外部符号 __imp_RegOpenKeyA,该符号在函数 "public: void __cdecl RedisEventLog::InstallEventLogSource(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?InstallEventLogSource@RedisEventLog@@QEAAXV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) 中被引用
1>Win32_Interopd.lib(Win32_EventLog.obj) : error LNK2019: 无法解析的外部符号 __imp_RegQueryValueExA,该符号在函数 "public: void __cdecl RedisEventLog::InstallEventLogSource(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?InstallEventLogSource@RedisEventLog@@QEAAXV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) 中被引用
1>Win32_Interopd.lib(Win32_EventLog.obj) : error LNK2019: 无法解析的外部符号 __imp_RegSetValueExA,该符号在函数 "public: void __cdecl RedisEventLog::InstallEventLogSource(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?InstallEventLogSource@RedisEventLog@@QEAAXV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) 中被引用

解决办法:调用psapi.lib库

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值