我试图使用libtins解析一些DNS答案,但我收到了很多链接器错误。我添加了库和其他库目录,并在文档中看到了这一行
如果您在Windows上使用静态构建的libtins,那么您可以将应用程序与tins.lib链接。您还需要将此宏定义添加到项目中:
TINS_STATIC
这将使您的项目使用libtins而不尝试从DLL导入符号,但是从静态库导入符号。
所以我将/ DTINS_STATIC添加到我的编译器命令行。
但我收到此错误日志
1>------ Rebuild All started: Project: DNSParser, Configuration: Debug Win32 ------
1> stdafx.cpp
1> DNSWinPcap.cpp
1>c:\users\hector\documents\visual studio
1> Generating Code...
1>tins.lib(pdu.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1900' in DNSParser.obj
this is repeated a lot of times...
1>tins.lib(rsn_information.obj) : warning LNK4049: locally defined symbol ??0_Container_base12@std@@QAE@XZ (public: __thiscall std::_Container_base12::_Container_base12(void)) imported
1>tins.lib(dot11_control.obj) : warning LNK4049: locally defined symbol ??0_Container_base12@std@@QAE@XZ (public: __thiscall std::_Container_base12::_Container_base12(void)) imported
1>tins.lib(stp.obj) : warning LNK4049: locally defined symbol ??0_Container_base12@std@@QAE@XZ (public: __thiscall std::_Container_base12::_Container_base12(void)) imported
1>tins.lib(snap.obj) : warning LNK4049: locally defined symbol ??0_Container_base12@std@@QAE@XZ (public: __thiscall std::_Container_base12::_Container_base12(void)) imported
1>tins.lib(dot11_mgmt.obj) : warning LNK4049: locally defined symbol ??0_Container_base12@std@@QAE@XZ (public: __thiscall std::_Container_base12::_Container_base12(void)) imported
1>tins.lib(dot11_beacon.obj) : warning LNK4049: locally defined symbol ??0_Container_base12@std@@QAE@XZ (public: __thiscall std::_Container_base12::_Container_base12(void)) imported
1>tins.lib(dot11_assoc.obj) : warning LNK4049: locally defined symbol ??0_Container_base12@std@@QAE@XZ (public: __thiscall std::_Container_base12::_Container_base12(void)) imported
1>tins.lib(dot11_auth.obj) : warning LNK4049: locally defined symbol ??0_Container_base12@std@@QAE@XZ (public: __thiscall std::_Container_base12::_Container_base12(void)) imported
1>tins.lib(dot11_probe.obj) : warning LNK4049: locally defined symbol ??0_Container_base12@std@@QAE@XZ (public: __thiscall std::_Container_base12::_Container_base12(void)) imported
1>tins.lib(network_interface.obj) : warning LNK4049: locally defined symbol ??0_Container_base12@std@@QAE@XZ (public: __thiscall std::_Container_base12::_Container_base12(void)) imported
There are around 200 warnings like these
1>tins.lib(dot11_mgmt.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base12::_Swap_all(struct std::_Container_base12 &)" (__imp_?_Swap_all@_Container_base12@std@@QAEXAAU12@@Z)
1>tins.lib(rsn_information.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base12::_Swap_all(struct std::_Container_base12 &)" (__imp_?_Swap_all@_Container_base12@std@@QAEXAAU12@@Z)
1>tins.lib(icmpv6.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base12::_Swap_all(struct std::_Container_base12 &)" (__imp_?_Swap_all@_Container_base12@std@@QAEXAAU12@@Z)
1>tins.lib(pppoe.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base12::_Swap_all(struct std::_Container_base12 &)" (__imp_?_Swap_all@_Container_base12@std@@QAEXAAU12@@Z)
1>tins.lib(utils.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base12::_Swap_all(struct std::_Container_base12 &)" (__imp_?_Swap_all@_Container_base12@std@@QAEXAAU12@@Z)
1>tins.lib(network_interface.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base12::_Swap_all(struct std::_Container_base12 &)" (__imp_?_Swap_all@_Container_base12@std@@QAEXAAU12@@Z)
1>tins.lib(pdu.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base12::_Swap_all(struct std::_Container_base12 &)" (__imp_?_Swap_all@_Container_base12@std@@QAEXAAU12@@Z)
1>tins.lib(dns.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base12::_Swap_all(struct std::_Container_base12 &)" (__imp_?_Swap_all@_Container_base12@std@@QAEXAAU12@@Z)
1>tins.lib(tcp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base12::_Swap_all(struct std::_Container_base12 &)" (__imp_?_Swap_all@_Container_base12@std@@QAEXAAU12@@Z)
1>tins.lib(icmp_extension.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base12::_Swap_all(struct std::_Container_base12 &)" (__imp_?_Swap_all@_Container_base12@std@@QAEXAAU12@@Z)
1>tins.lib(rsn_information.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map@std@@YAPBDH@Z)
1>tins.lib(dot11_control.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map@std@@YAPBDH@Z)
1>tins.lib(stp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map@std@@YAPBDH@Z)
1>tins.lib(snap.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map@std@@YAPBDH@Z)
1>tins.lib(dot11_mgmt.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map@std@@YAPBDH@Z)
1>tins.lib(dot11_beacon.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map@std@@YAPBDH@Z)
1>tins.lib(dot11_assoc.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map@std@@YAPBDH@Z)
1>tins.lib(dot11_auth.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map@std@@YAPBDH@Z)
1>tins.lib(dot11_probe.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map@std@@YAPBDH@Z)
1>tins.lib(network_interface.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map@std@@YAPBDH@Z)
1>tins.lib(packet_sender.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map@std@@YAPBDH@Z)
1>tins.lib(llc.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map@std@@YAPBDH@Z)
1>tins.lib(dot11_data.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map@std@@YAPBDH@Z)
1>tins.lib(rawpdu.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map@std@@YAPBDH@Z)
1>tins.lib(dot1q.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map@std@@YAPBDH@Z)
1>tins.lib(pppoe.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map@std@@YAPBDH@Z)
1>tins.lib(utils.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map@std@@YAPBDH@Z)
1>tins.lib(icmpv6.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map@std@@YAPBDH@Z)
1>tins.lib(mpls.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map@std@@YAPBDH@Z)
1>tins.lib(arp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map@std@@YAPBDH@Z)
1>tins.lib(eapol.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map@std@@YAPBDH@Z)
1>tins.lib(icmp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map@std@@YAPBDH@Z)
1>tins.lib(loopback.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map@std@@YAPBDH@Z)
1>tins.lib(sll.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map@std@@YAPBDH@Z)
1>tins.lib(ppi.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map@std@@YAPBDH@Z)
1>tins.lib(tcp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map@std@@YAPBDH@Z)
1>tins.lib(udp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map@std@@YAPBDH@Z)
1>tins.lib(ipsec.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map@std@@YAPBDH@Z)
1>tins.lib(icmp_extension.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map@std@@YAPBDH@Z)
1>tins.lib(dot3.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map@std@@YAPBDH@Z)
1>tins.lib(radiotap.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map@std@@YAPBDH@Z)
1>tins.lib(dot11_base.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map@std@@YAPBDH@Z)
1>tins.lib(ipv6.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map@std@@YAPBDH@Z)
1>tins.lib(address_range.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map@std@@YAPBDH@Z)
1>tins.lib(internals.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map@std@@YAPBDH@Z)
1>tins.lib(ip.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map@std@@YAPBDH@Z)
1>tins.lib(ethernetII.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map@std@@YAPBDH@Z)
1>tins.lib(pdu.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map@std@@YAPBDH@Z)
1>tins.lib(dns.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map@std@@YAPBDH@Z)
1>tins.lib(ip_address.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map@std@@YAPBDH@Z)
1>tins.lib(ipv6_address.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map@std@@YAPBDH@Z)
1>tins.lib(dns.obj) : error LNK2019: unresolved external symbol __imp__sprintf referenced in function "private: static void __cdecl Tins::DNS::inline_convert_v4(unsigned int,char *)" (?inline_convert_v4@DNS@Tins@@CAXIPAD@Z)
1>tins.lib(snap.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
1>tins.lib(dot11_mgmt.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
1>tins.lib(rsn_information.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
1>tins.lib(dot11_auth.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
1>tins.lib(dot11_probe.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
1>tins.lib(dot11_control.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
1>tins.lib(stp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
1>tins.lib(llc.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
1>tins.lib(dot11_data.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
1>tins.lib(dot11_beacon.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
1>tins.lib(dot11_assoc.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
1>tins.lib(pppoe.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
1>tins.lib(utils.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
1>tins.lib(network_interface.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
1>tins.lib(packet_sender.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
1>tins.lib(arp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
1>tins.lib(eapol.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
1>tins.lib(rawpdu.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
1>tins.lib(dot1q.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
1>tins.lib(sll.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
1>tins.lib(ppi.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
1>tins.lib(icmpv6.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
1>tins.lib(mpls.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
1>tins.lib(ipsec.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
1>tins.lib(icmp_extension.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
1>tins.lib(icmp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
1>tins.lib(loopback.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
1>tins.lib(dot11_base.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
1>tins.lib(ipv6.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
1>tins.lib(tcp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
1>tins.lib(udp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
1>tins.lib(ip.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
1>tins.lib(ethernetII.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
1>tins.lib(dot3.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
1>tins.lib(radiotap.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
1>tins.lib(dns.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
1>tins.lib(ip_address.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
1>tins.lib(ipv6_address.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
1>tins.lib(address_range.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
1>tins.lib(ip_address.obj) : error LNK2019: unresolved external symbol __imp__inet_pton@12 referenced in function "private: unsigned int __thiscall Tins::IPv4Address::ip_to_int(char const *)" (?ip_to_int@IPv4Address@Tins@@AAEIPBD@Z)
1>tins.lib(ipv6_address.obj) : error LNK2001: unresolved external symbol __imp__inet_pton@12
1>tins.lib(ipv6_address.obj) : error LNK2019: unresolved external symbol _inet_ntop@16 referenced in function "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall Tins::IPv6Address::to_string(void)const " (?to_string@IPv6Address@Tins@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ)
1>tins.lib(dot11_control.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(void)" (__imp_??0exception@std@@QAE@XZ)
1>tins.lib(stp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(void)" (__imp_??0exception@std@@QAE@XZ)
1>tins.lib(dot11_mgmt.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(void)" (__imp_??0exception@std@@QAE@XZ)
1>tins.lib(dot11_beacon.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(void)" (__imp_??0exception@std@@QAE@XZ)
1>tins.lib(dot11_assoc.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(void)" (__imp_??0exception@std@@QAE@XZ)
1>tins.lib(dot11_auth.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(void)" (__imp_??0exception@std@@QAE@XZ)
1>tins.lib(dot11_probe.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(void)" (__imp_??0exception@std@@QAE@XZ)
1>tins.lib(icmpv6.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(void)" (__imp_??0exception@std@@QAE@XZ)
1>tins.lib(mpls.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(void)" (__imp_??0exception@std@@QAE@XZ)
1>tins.lib(pppoe.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(void)" (__imp_??0exception@std@@QAE@XZ)
1>tins.lib(dot11_data.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(void)" (__imp_??0exception@std@@QAE@XZ)
1>tins.lib(ip.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(void)" (__imp_??0exception@std@@QAE@XZ)
1>tins.lib(ipv6.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(void)" (__imp_??0exception@std@@QAE@XZ)
1>tins.lib(tcp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(void)" (__imp_??0exception@std@@QAE@XZ)
1>tins.lib(icmp_extension.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(void)" (__imp_??0exception@std@@QAE@XZ)
1>tins.lib(utils.obj) : error LNK2019: unresolved external symbol __imp__getaddrinfo@16 referenced in function __catch$?route6_entries@Utils@Tins@@YA?AV?$vector@URoute6Entry@Utils@Tins@@V?$allocator@URoute6Entry@Utils@Tins@@@std@@@std@@XZ$0
1>tins.lib(utils.obj) : error LNK2019: unresolved external symbol __imp__freeaddrinfo@4 referenced in function "class Tins::IPv4Address __cdecl Tins::Utils::resolve_domain(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?resolve_domain@Utils@Tins@@YA?AVIPv4Address@2@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>tins.lib(utils.obj) : error LNK2019: unresolved external symbol _GetIpForwardTable@12 referenced in function "class std::vector<struct Tins::Utils::RouteEntry,class std::allocator<struct Tins::Utils::RouteEntry> > __cdecl Tins::Utils::route_entries(void)" (?route_entries@Utils@Tins@@YA?AV?$vector@URouteEntry@Utils@Tins@@V?$allocator@URouteEntry@Utils@Tins@@@std@@@std@@XZ)
1>tins.lib(utils.obj) : error LNK2019: unresolved external symbol _GetAdaptersAddresses@20 referenced in function "class std::set<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > __cdecl Tins::Utils::network_interfaces(void)" (?network_interfaces@Utils@Tins@@YA?AV?$set@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@XZ)
1>tins.lib(network_interface.obj) : error LNK2001: unresolved external symbol _GetAdaptersAddresses@20
1>tins.lib(utils.obj) : error LNK2019: unresolved external symbol _SendARP@16 referenced in function "class Tins::HWAddress<6,unsigned char> __cdecl Tins::Utils::resolve_hwaddr(class Tins::NetworkInterface const &,class Tins::IPv4Address,class Tins::PacketSender &)" (?resolve_hwaddr@Utils@Tins@@YA?AV?$HWAddress@$05E@2@ABVNetworkInterface@2@VIPv4Address@2@AAVPacketSender@2@@Z)
1>tins.lib(utils.obj) : error LNK2019: unresolved external symbol _GetIpForwardTable2@8 referenced in function "class std::vector<struct Tins::Utils::Route6Entry,class std::allocator<struct Tins::Utils::Route6Entry> > __cdecl Tins::Utils::route6_entries(void)" (?route6_entries@Utils@Tins@@YA?AV?$vector@URoute6Entry@Utils@Tins@@V?$allocator@URoute6Entry@Utils@Tins@@@std@@@std@@XZ)
1>tins.lib(utils.obj) : error LNK2019: unresolved external symbol _FreeMibTable@4 referenced in function __catch$?route6_entries@Utils@Tins@@YA?AV?$vector@URoute6Entry@Utils@Tins@@V?$allocator@URoute6Entry@Utils@Tins@@@std@@@std@@XZ$0
1>tins.lib(packet_sender.obj) : error LNK2019: unresolved external symbol ___WSAFDIsSet@8 referenced in function __catch$?send_recv@PacketSender@Tins@@QAEPAVPDU@2@AAV32@ABVNetworkInterface@2@@Z$0
1>tins.lib(packet_sender.obj) : error LNK2019: unresolved external symbol __imp__closesocket@4 referenced in function "public: __thiscall Tins::PacketSender::~PacketSender(void)" (??1PacketSender@Tins@@QAE@XZ)
1>tins.lib(packet_sender.obj) : error LNK2019: unresolved external symbol __imp__recvfrom@24 referenced in function __catch$?send_recv@PacketSender@Tins@@QAEPAVPDU@2@AAV32@ABVNetworkInterface@2@@Z$0
1>tins.lib(packet_sender.obj) : error LNK2019: unresolved external symbol __imp__select@20 referenced in function __catch$?send_recv@PacketSender@Tins@@QAEPAVPDU@2@AAV32@ABVNetworkInterface@2@@Z$0
1>tins.lib(packet_sender.obj) : error LNK2019: unresolved external symbol __imp__sendto@24 referenced in function __catch$?send_recv@PacketSender@Tins@@QAEPAVPDU@2@AAV32@ABVNetworkInterface@2@@Z$0
1>tins.lib(packet_sender.obj) : error LNK2019: unresolved external symbol __imp__setsockopt@20 referenced in function "public: void __thiscall Tins::PacketSender::open_l3_socket(enum Tins::PacketSender::SocketType)" (?open_l3_socket@PacketSender@Tins@@QAEXW4SocketType@12@@Z)
1>tins.lib(packet_sender.obj) : error LNK2019: unresolved external symbol __imp__socket@12 referenced in function "public: void __thiscall Tins::PacketSender::open_l3_socket(enum Tins::PacketSender::SocketType)" (?open_l3_socket@PacketSender@Tins@@QAEXW4SocketType@12@@Z)
1>C:\Users\Hector\Documents\Visual Studio 2015\Projects\DNSParser\Debug\DNSParser.exe : fatal error LNK1120: 21 unresolved externals
答案 0 :(得分:0)
您正在链接由不同版本的编译器编译的对象。尝试在项目属性中编辑Platform Toolset。