我正在尝试读取与discord_rpc结合使用的内存值,以向现有程序中添加一种丰富的状态伪功能。

似乎每当我尝试#include <iostream>时,每当我尝试编译代码时,都会引发很多错误。

这是一些错误:

Error   LNK2038 mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in Discord RPC.obj Discord RPC C:\Users\Joseph\source\repos\Discord RPC\Discord RPC\discord-rpc.lib(discord_rpc.obj)   1
Error   LNK2038 mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in Discord RPC.obj Discord RPC C:\Users\Joseph\source\repos\Discord RPC\Discord RPC\discord-rpc.lib(discord_rpc.obj)   1
Error   LNK2038 mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in Discord RPC.obj Discord RPC C:\Users\Joseph\source\repos\Discord RPC\Discord RPC\discord-rpc.lib(discord_register_win.obj)  1
Error   LNK2038 mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in Discord RPC.obj Discord RPC C:\Users\Joseph\source\repos\Discord RPC\Discord RPC\discord-rpc.lib(discord_register_win.obj)  1
Error   LNK2038 mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in Discord RPC.obj Discord RPC C:\Users\Joseph\source\repos\Discord RPC\Discord RPC\discord-rpc.lib(serialization.obj) 1
Error   LNK2038 mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in Discord RPC.obj Discord RPC C:\Users\Joseph\source\repos\Discord RPC\Discord RPC\discord-rpc.lib(serialization.obj) 1
Error   LNK2038 mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in Discord RPC.obj Discord RPC C:\Users\Joseph\source\repos\Discord RPC\Discord RPC\discord-rpc.lib(rpc_connection.obj)    1
Error   LNK2038 mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in Discord RPC.obj Discord RPC C:\Users\Joseph\source\repos\Discord RPC\Discord RPC\discord-rpc.lib(rpc_connection.obj)    1
Warning LNK4098 defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library Discord RPC C:\Users\Joseph\source\repos\Discord RPC\Discord RPC\LINK   1
Error   LNK1319 8 mismatches detected   Discord RPC C:\Users\Joseph\source\repos\Discord RPC\Debug\Discord RPC.exe  1

我是C++的新手,所以我几乎不知道我在做什么错。

到目前为止,这是我完整代码的pastebin:https://pastebin.com/N1vnJiXZ
我也在使用Visual Studio 2017

最佳答案

似乎我在使用C代码示例来构建程序中不和谐的RPC部分,并且我认为C不想与C++很好地结合。非常愚蠢的错误,尽管我从中了解到这很重要。

关于c++ - iostream导致与另一个库不匹配,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/49828130/

10-12 22:22