(注意:我使用的是 Visual Studio 2013)
我正在尝试在我的项目中使用 RakNet,但遇到了很多问题。
如果我尝试在没有 lib 文件的情况下进行编译:
Error 2 error LNK2019: unresolved external symbol
"public: __thiscall RakNet::SystemAddress::SystemAddress(void)"
(??0SystemAddress@RakNet@@QAE@XZ) referenced in function
"void __cdecl RakNet::`dynamic initializer for 'UNASSIGNED_SYSTEM_ADDRESS''(void)"
(??__EUNASSIGNED_SYSTEM_ADDRESS@RakNet@@YAXXZ) E:\Fazbear Entertainment\FEplusplus\server\server.obj _server
如果我尝试使用我在 VS2013 中编译的 RakNet 静态库文件进行编译:
Error 5 error LNK2019: unresolved external symbol "public: static void __cdecl
RakNet::RakNetSocket2::DomainNameToIP(char const *,char * const)"
(?DomainNameToIP@RakNetSocket2@RakNet@@SAXPBDQAD@Z) referenced in function
"public: bool __thiscall RakNet::SystemAddress::SetBinaryAddress(char const *,char)"
(?SetBinaryAddress@SystemAddress@RakNet@@QAE_NPBDD@Z) E:\Fazbear Entertainment\FEplusplus\server\RakNetLibStatic.lib(RakNetTypes.obj) _server
Error 2 error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in server.obj E:\Fazbear Entertainment\FEplusplus\server\RakNetLibStatic.lib(RakNetTypes.obj) _server
Error 3 error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MDd_DynamicDebug' in server.obj E:\Fazbear Entertainment\FEplusplus\server\RakNetLibStatic.lib(RakNetTypes.obj) _server
我只有在#include "RakPeerInterface.h"
.
如果我能在某处找到预编译的库,也许会有所帮助?