Linking libtins in Visual Studio 2015 - c++

I'm trying to use libtins to parse some DNS answers but I'm getting a lot of linker errors. I added the library and the additional library directories and in the documentation I saw this line
If you are using a static build of libtins on Windows, then you have link your application with tins.lib. You also need to add this macro definition to your project:
TINS_STATIC
This will make your project use libtins without trying to import symbols from a DLL but from the static library.
So I added /DTINS_STATIC to my compiler command line.
But I'm getting this error log
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

You are linking objects compiled by different versions of the compiler. Try editing Platform Toolset in project properties.

Related

CMake Qt build on windows linker problems

I am trying to build and compile a Qt project from a repo. The project contains a CMake file, which I am using to build and then compile using nmake. However, I am getting a bunch of linker errors towards the end of the compile and don't have much experience with CMake so not really sure where I am going wrong. I am using MSVC 14.11.25503.
The CMakeList.txt is here:
cmake_minimum_required(VERSION 3.6 FATAL_ERROR)
project(loggerGUI CXX)
set(TARGET ${CMAKE_PROJECT_NAME})
set(CMAKE_AUTOMOC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
find_package(Qt5Widgets REQUIRED)
find_package(Qt5PrintSupport REQUIRED)
find_package(Qt5Bluetooth REQUIRED)
add_subdirectory(include/cpptoml)
add_subdirectory(include/qcustomplot)
add_subdirectory(include/easylogging++)
file(GLOB CPP_SOURCES
src/*.cpp)
file(GLOB HDR_SOURCES
src/*.h)
set(UI_SOURCES src/mainwindow.ui)
qt5_wrap_cpp(HDR_MOC ${HDR_SOURCES})
qt5_wrap_ui(UI_GENERATED_HEADERS ${UI_SOURCES})
add_executable(${TARGET} ${CPP_SOURCES} ${HDR_MOC} ${UI_GENERATED_HEADERS})
# generate proper GUI program on specified platform
if(WIN32) # Check if we are on Windows
if(MSVC) # Check if we are using the Visual Studio compiler
set_target_properties(${TARGET} PROPERTIES
WIN32_EXECUTABLE YES
LINK_FLAGS "/ENTRY:mainCRTStartup"
)
elseif(CMAKE_COMPILER_IS_GNUCXX)
# SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mwindows") # Not tested
else()
message(SEND_ERROR "You are using an unsupported Windows compiler! (Not MSVC or GCC)")
endif(MSVC)
elseif(APPLE)
set_target_properties(${TARGET} PROPERTIES
MACOSX_BUNDLE YES
)
elseif(UNIX)
# Nothing special required
else()
message(SEND_ERROR "You are on an unsupported platform! (Not Win32, Mac OS X or Unix)")
endif(WIN32)
qt5_use_modules(${TARGET} Widgets PrintSupport Bluetooth)
target_link_libraries(${TARGET} cpptoml)
target_link_libraries(${TARGET} easylogging++)
target_link_libraries(${TARGET} qcustomplot)
I am deleting my build folder before running CMake so from what I understand globbing shouldn't be a problem. Here is a part of the output from nmake (I can't fit it all in and at a point it becomes redundant):
[ 80%] Linking CXX executable loggerGUI.exe
mocs_compilation.cpp.obj : error LNK2005: "public: virtual struct QMetaObject const * __thiscall ConnectionHandler::metaObject(void)const " (?metaObject#ConnectionHandler##UBEPBUQMetaObject##XZ) already defined in moc_connectionHandler.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "public: virtual void * __thiscall ConnectionHandler::qt_metacast(char const *)" (?qt_metacast#ConnectionHandler##UAEPAXPBD#Z) already defined in moc_connectionHandler.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "public: virtual int __thiscall ConnectionHandler::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall#ConnectionHandler##UAEHW4Call#QMetaObject##HPAPAX#Z) already defined in moc_connectionHandler.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "private: static void __cdecl ConnectionHandler::qt_static_metacall(class QObject *,enum QMetaObject::Call,int,void * *)" (?qt_static_metacall#ConnectionHandler##CAXPAVQObject##W4Call#QMetaObject##HPAPAX#Z) already defined in moc_connectionHandler.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "public: virtual struct QMetaObject const * __thiscall Logger::metaObject(void)const " (?metaObject#Logger##UBEPBUQMetaObject##XZ) already defined in moc_logger.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "public: virtual void * __thiscall Logger::qt_metacast(char const *)" (?qt_metacast#Logger##UAEPAXPBD#Z) already defined in moc_logger.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "public: virtual int __thiscall Logger::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall#Logger##UAEHW4Call#QMetaObject##HPAPAX#Z) already defined in moc_logger.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "private: static void __cdecl Logger::qt_static_metacall(class QObject *,enum QMetaObject::Call,int,void * *)" (?qt_static_metacall#Logger##CAXPAVQObject##W4Call#QMetaObject##HPAPAX#Z) already defined in moc_logger.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "public: virtual struct QMetaObject const * __thiscall Plotter::metaObject(void)const " (?metaObject#Plotter##UBEPBUQMetaObject##XZ) already defined in moc_plotter.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "public: virtual void * __thiscall Plotter::qt_metacast(char const *)" (?qt_metacast#Plotter##UAEPAXPBD#Z) already defined in moc_plotter.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "public: virtual int __thiscall Plotter::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall#Plotter##UAEHW4Call#QMetaObject##HPAPAX#Z) already defined in moc_plotter.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "private: static void __cdecl Plotter::qt_static_metacall(class QObject *,enum QMetaObject::Call,int,void * *)" (?qt_static_metacall#Plotter##CAXPAVQObject##W4Call#QMetaObject##HPAPAX#Z) already defined in moc_plotter.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "public: virtual struct QMetaObject const * __thiscall SerialParser::metaObject(void)const " (?metaObject#SerialParser##UBEPBUQMetaObject##XZ) already defined in moc_serialParser.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "public: virtual void * __thiscall SerialParser::qt_metacast(char const *)" (?qt_metacast#SerialParser##UAEPAXPBD#Z) already defined in moc_serialParser.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "public: virtual int __thiscall SerialParser::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall#SerialParser##UAEHW4Call#QMetaObject##HPAPAX#Z) already defined in moc_serialParser.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "private: static void __cdecl SerialParser::qt_static_metacall(class QObject *,enum QMetaObject::Call,int,void * *)" (?qt_static_metacall#SerialParser##CAXPAVQObject##W4Call#QMetaObject##HPAPAX#Z) already defined in moc_serialParser.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "public: virtual struct QMetaObject const * __thiscall Table::metaObject(void)const " (?metaObject#Table##UBEPBUQMetaObject##XZ) already defined in moc_table.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "public: virtual void * __thiscall Table::qt_metacast(char const *)" (?qt_metacast#Table##UAEPAXPBD#Z) already defined in moc_table.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "public: virtual int __thiscall Table::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall#Table##UAEHW4Call#QMetaObject##HPAPAX#Z) already defined in moc_table.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "private: static void __cdecl Table::qt_static_metacall(class QObject *,enum QMetaObject::Call,int,void * *)" (?qt_static_metacall#Table##CAXPAVQObject##W4Call#QMetaObject##HPAPAX#Z) already defined in moc_table.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "public: void __thiscall Table::graphToggled(class dataStream)" (?graphToggled#Table##QAEXVdataStream###Z) already defined in moc_table.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "public: void __thiscall Table::axisToggled(class dataStream)" (?axisToggled#Table##QAEXVdataStream###Z) already defined in moc_table.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "public: virtual struct QMetaObject const * __thiscall loggerGUI::metaObject(void)const " (?metaObject#loggerGUI##UBEPBUQMetaObject##XZ) already defined in moc_loggerGUI.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "public: virtual void * __thiscall loggerGUI::qt_metacast(char const *)" (?qt_metacast#loggerGUI##UAEPAXPBD#Z) already defined in moc_loggerGUI.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "public: virtual int __thiscall loggerGUI::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall#loggerGUI##UAEHW4Call#QMetaObject##HPAPAX#Z) already defined in moc_loggerGUI.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "private: static void __cdecl loggerGUI::qt_static_metacall(class QObject *,enum QMetaObject::Call,int,void * *)" (?qt_static_metacall#loggerGUI##CAXPAVQObject##W4Call#QMetaObject##HPAPAX#Z) already defined in moc_loggerGUI.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "public: void __thiscall loggerGUI::newDataAvailable(void)" (?newDataAvailable#loggerGUI##QAEXXZ) already defined in moc_loggerGUI.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "public: static struct QMetaObject const ConnectionHandler::staticMetaObject" (?staticMetaObject#ConnectionHandler##2UQMetaObject##B) already defined in moc_connectionHandler.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "public: static struct QMetaObject const Logger::staticMetaObject" (?staticMetaObject#Logger##2UQMetaObject##B) already defined in moc_logger.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "public: static struct QMetaObject const Plotter::staticMetaObject" (?staticMetaObject#Plotter##2UQMetaObject##B) already defined in moc_plotter.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "public: static struct QMetaObject const SerialParser::staticMetaObject" (?staticMetaObject#SerialParser##2UQMetaObject##B) already defined in moc_serialParser.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "public: static struct QMetaObject const Table::staticMetaObject" (?staticMetaObject#Table##2UQMetaObject##B) already defined in moc_table.cpp.obj
mocs_compilation.cpp.obj : error LNK2005: "public: static struct QMetaObject const loggerGUI::staticMetaObject" (?staticMetaObject#loggerGUI##2UQMetaObject##B) already defined in moc_loggerGUI.cpp.obj
moc_table.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::QString(class QString const &)" (__imp_??0QString##QAE#ABV0##Z)
mocs_compilation.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::QString(class QString const &)" (__imp_??0QString##QAE#ABV0##Z)
qcustomplot.lib(qcustomplot.cpp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::QString(class QString const &)" (__imp_??0QString##QAE#ABV0##Z)
qcustomplot.lib(mocs_compilation.cpp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::QString(class QString const &)" (__imp_??0QString##QAE#ABV0##Z)
config.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::QString(class QString const &)" (__imp_??0QString##QAE#ABV0##Z)
loggerGUI.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::QString(class QString const &)" (__imp_??0QString##QAE#ABV0##Z)
table.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::QString(class QString const &)" (__imp_??0QString##QAE#ABV0##Z)
moc_plotter.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::QString(class QString const &)" (__imp_??0QString##QAE#ABV0##Z)
moc_table.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::~QString(void)" (__imp_??1QString##QAE#XZ)
mocs_compilation.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::~QString(void)" (__imp_??1QString##QAE#XZ)
qcustomplot.lib(qcustomplot.cpp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::~QString(void)" (__imp_??1QString##QAE#XZ)
qcustomplot.lib(mocs_compilation.cpp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::~QString(void)" (__imp_??1QString##QAE#XZ)
plotter.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::~QString(void)" (__imp_??1QString##QAE#XZ)
serialParser.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::~QString(void)" (__imp_??1QString##QAE#XZ)
table.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::~QString(void)" (__imp_??1QString##QAE#XZ)
moc_plotter.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::~QString(void)" (__imp_??1QString##QAE#XZ)
config.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::~QString(void)" (__imp_??1QString##QAE#XZ)
connectionHandler.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::~QString(void)" (__imp_??1QString##QAE#XZ)
logger.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::~QString(void)" (__imp_??1QString##QAE#XZ)
loggerGUI.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::~QString(void)" (__imp_??1QString##QAE#XZ)
config.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::QString(class QString &&)" (__imp_??0QString##QAE#$$QAV0##Z) referenced in function "public: __thiscall dataStream::dataStream(class dataStream &&)" (??0dataStream##QAE#$$QAV0##Z)
qcustomplot.lib(qcustomplot.cpp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::QString(class QString &&)" (__imp_??0QString##QAE#$$QAV0##Z)
config.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class QString & __thiscall QString::operator=(class QString &&)" (__imp_??4QString##QAEAAV0#$$QAV0##Z) referenced in function "class std::vector<class dataStream,class std::allocator<class dataStream> > __cdecl readConfig(struct ConfigData &)" (?readConfig##YA?AV?$vector#VdataStream##V?$allocator#VdataStream###std###std##AAUConfigData###Z)
qcustomplot.lib(qcustomplot.cpp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class QString & __thiscall QString::operator=(class QString &&)" (__imp_??4QString##QAEAAV0#$$QAV0##Z)
qcustomplot.lib(mocs_compilation.cpp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class QString & __thiscall QString::operator=(class QString &&)" (__imp_??4QString##QAEAAV0#$$QAV0##Z)
config.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class QString __cdecl QString::fromStdString(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_?fromStdString#QString##SA?AV1#ABV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###Z) referenced in function "class std::vector<class dataStream,class std::allocator<class dataStream> > __cdecl readConfig(struct ConfigData &)" (?readConfig##YA?AV?$vector#VdataStream##V?$allocator#VdataStream###std###std##AAUConfigData###Z)
qcustomplot.lib(qcustomplot.cpp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::QString(void)" (__imp_??0QString##QAE#XZ)
connectionHandler.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::QString(void)" (__imp_??0QString##QAE#XZ)
logger.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::QString(void)" (__imp_??0QString##QAE#XZ)
loggerGUI.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::QString(void)" (__imp_??0QString##QAE#XZ)
plotter.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::QString(void)" (__imp_??0QString##QAE#XZ)
connectionHandler.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class QString & __thiscall QString::operator=(class QString const &)" (__imp_??4QString##QAEAAV0#ABV0##Z) referenced in function "public: struct ConfigData & __thiscall ConfigData::operator=(struct ConfigData const &)" (??4ConfigData##QAEAAU0#ABU0##Z)
logger.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class QString & __thiscall QString::operator=(class QString const &)" (__imp_??4QString##QAEAAV0#ABV0##Z)
plotter.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class QString & __thiscall QString::operator=(class QString const &)" (__imp_??4QString##QAEAAV0#ABV0##Z)
qcustomplot.lib(qcustomplot.cpp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class QString & __thiscall QString::operator=(class QString const &)" (__imp_??4QString##QAEAAV0#ABV0##Z)
connectionHandler.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QMetaObject::Connection::~Connection(void)" (__imp_??1Connection#QMetaObject##QAE#XZ) referenced in function "public: void __thiscall ConnectionHandler::setup(void)" (?setup#ConnectionHandler##QAEXXZ)
loggerGUI.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QMetaObject::Connection::~Connection(void)" (__imp_??1Connection#QMetaObject##QAE#XZ)
table.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QMetaObject::Connection::~Connection(void)" (__imp_??1Connection#QMetaObject##QAE#XZ)
qcustomplot.lib(qcustomplot.cpp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QMetaObject::Connection::~Connection(void)" (__imp_??1Connection#QMetaObject##QAE#XZ)
table.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QObject::QObject(class QObject *)" (__imp_??0QObject##QAE#PAV0##Z)
qcustomplot.lib(qcustomplot.cpp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QObject::QObject(class QObject *)" (__imp_??0QObject##QAE#PAV0##Z)
connectionHandler.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QObject::QObject(class QObject *)" (__imp_??0QObject##QAE#PAV0##Z)
logger.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QObject::QObject(class QObject *)" (__imp_??0QObject##QAE#PAV0##Z)
loggerGUI.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QObject::QObject(class QObject *)" (__imp_??0QObject##QAE#PAV0##Z)
plotter.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QObject::QObject(class QObject *)" (__imp_??0QObject##QAE#PAV0##Z)
table.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall QObject::~QObject(void)" (__imp_??1QObject##UAE#XZ)
qcustomplot.lib(qcustomplot.cpp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall QObject::~QObject(void)" (__imp_??1QObject##UAE#XZ)
connectionHandler.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall QObject::~QObject(void)" (__imp_??1QObject##UAE#XZ)
logger.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall QObject::~QObject(void)" (__imp_??1QObject##UAE#XZ)
loggerGUI.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall QObject::~QObject(void)" (__imp_??1QObject##UAE#XZ)
plotter.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall QObject::~QObject(void)" (__imp_??1QObject##UAE#XZ)
connectionHandler.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) private: static class QMetaObject::Connection __cdecl QObject::connectImpl(class QObject const *,void * *,class QObject const *,void * *,class QtPrivate::QSlotObjectBase *,enum Qt::ConnectionType,int const *,struct QMetaObject const *)" (__imp_?connectImpl#QObject##CA?AVConnection#QMetaObject##PBV1#PAPAX01PAVQSlotObjectBase#QtPrivate##W4ConnectionType#Qt##PBHPBU3##Z) referenced in function "public: static class QMetaObject::Connection __cdecl QObject::connect<void (__thiscall QBluetoothSocket::*)(void),class <lambda_582bb6fe4d5712728322f8f22541ba8e> >(class QBluetoothSocket const *,void (__thiscall QBluetoothSocket::*)(void),class QObject const *,class <lambda_582bb6fe4d5712728322f8f22541ba8e>,enum Qt::ConnectionType)" (??$connect#P8QBluetoothSocket##AEXXZV<lambda_582bb6fe4d5712728322f8f22541ba8e>###QObject##SA?AVConnection#QMetaObject##PBVQBluetoothSocket##P83#AEXXZPBV0#V<lambda_582bb6fe4d5712728322f8f22541ba8e>##W4ConnectionType#Qt###Z)
loggerGUI.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) private: static class QMetaObject::Connection __cdecl QObject::connectImpl(class QObject const *,void * *,class QObject const *,void * *,class QtPrivate::QSlotObjectBase *,enum Qt::ConnectionType,int const *,struct QMetaObject const *)" (__imp_?connectImpl#QObject##CA?AVConnection#QMetaObject##PBV1#PAPAX01PAVQSlotObjectBase#QtPrivate##W4ConnectionType#Qt##PBHPBU3##Z)
table.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) private: static class QMetaObject::Connection __cdecl QObject::connectImpl(class QObject const *,void * *,class QObject const *,void * *,class QtPrivate::QSlotObjectBase *,enum Qt::ConnectionType,int const *,struct QMetaObject const *)" (__imp_?connectImpl#QObject##CA?AVConnection#QMetaObject##PBV1#PAPAX01PAVQSlotObjectBase#QtPrivate##W4ConnectionType#Qt##PBHPBU3##Z)
connectionHandler.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QBluetoothAddress::QBluetoothAddress(class QString const &)" (__imp_??0QBluetoothAddress##QAE#ABVQString###Z) referenced in function "public: void __thiscall ConnectionHandler::setup(void)" (?setup#ConnectionHandler##QAEXXZ)
connectionHandler.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QBluetoothAddress::~QBluetoothAddress(void)" (__imp_??1QBluetoothAddress##QAE#XZ) referenced in function "public: void __thiscall ConnectionHandler::setup(void)" (?setup#ConnectionHandler##QAEXXZ)
connectionHandler.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall QBluetoothSocket::connectToService(class QBluetoothAddress const &,unsigned short,class QFlags<enum QIODevice::OpenModeFlag>)" (__imp_?connectToService#QBluetoothSocket##QAEXABVQBluetoothAddress##GV?$QFlags#W4OpenModeFlag#QIODevice#####Z) referenced in function "public: void __thiscall ConnectionHandler::setup(void)" (?setup#ConnectionHandler##QAEXXZ)
connectionHandler.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: enum QBluetoothSocket::SocketState __thiscall QBluetoothSocket::state(void)const " (__imp_?state#QBluetoothSocket##QBE?AW4SocketState#1#XZ) referenced in function "public: void __thiscall <lambda_582bb6fe4d5712728322f8f22541ba8e>::operator()(void)const " (??R<lambda_582bb6fe4d5712728322f8f22541ba8e>##QBEXXZ)
connectionHandler.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall QBluetoothSocket::disconnected(void)" (__imp_?disconnected#QBluetoothSocket##QAEXXZ) referenced in function "public: void __thiscall ConnectionHandler::setup(void)" (?setup#ConnectionHandler##QAEXXZ)
table.cpp.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QObject::childEvent(class QChildEvent *)" (?childEvent#QObject##MAEXPAVQChildEvent###Z)
qcustomplot.lib(qcustomplot.cpp.obj) : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QObject::childEvent(class QChildEvent *)" (?childEvent#QObject##MAEXPAVQChildEvent###Z)
connectionHandler.cpp.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QObject::childEvent(class QChildEvent *)" (?childEvent#QObject##MAEXPAVQChildEvent###Z)
logger.cpp.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QObject::childEvent(class QChildEvent *)" (?childEvent#QObject##MAEXPAVQChildEvent###Z)
loggerGUI.cpp.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QObject::childEvent(class QChildEvent *)" (?childEvent#QObject##MAEXPAVQChildEvent###Z)
plotter.cpp.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QObject::childEvent(class QChildEvent *)" (?childEvent#QObject##MAEXPAVQChildEvent###Z)
table.cpp.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QObject::connectNotify(class QMetaMethod const &)" (?connectNotify#QObject##MAEXABVQMetaMethod###Z)
loggerGUI.exe : fatal error LNK1120: 976 unresolved externals
LINK Pass 1 failed. with 1120
I solve my linker issue hardcoding the paths of
set(Qt5_DIR "E:/QT/5.15.2/msvc2019_64/lib/cmake/Qt5")
set(Qt5Core_DIR "E:/QT/5.15.2/msvc2019_64/lib/cmake/Qt5Core")
set(QT_QMAKE_EXECUTABLE "E:/QT/5.15.2/msvc2019_64/bin/qmake.exe")
This link work for me
https://github.com/KDAB/GammaRay/issues/213

Creating a dll in pdfium

I am trying to create a dll for pdfium. I am using Visual Studio 2013 (C++)
I've tried following instructions from https://github.com/pvginkel/PdfiumViewer but that hasn't worked.(I am trying to get a pdfium dll for a project that is not PdfiumViewer). I get the following errors:
2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppBuild.targets(1193,5): warning MSB8012: TargetPath(\build\Debug\lib\pdfium.dll) does not match the Linker's OutputFile property value (C:\build\Debug\pdfium.dll). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
2> Creating library \build\Debug\pdfium.lib and object \build\Debug\pdfium.exp
2>fpdfdoc.lib(doc_form.obj) : error LNK2019: unresolved external symbol __imp_CreateFontA referenced in function "public: static class CPDF_Font * __cdecl CPDF_InterForm::AddSystemFont(class CPDF_Document const *,class CFX_ByteString,unsigned char)" (?AddSystemFont#CPDF_InterForm##SAPEAVCPDF_Font##PEBVCPDF_Document##VCFX_ByteString##E#Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2001: unresolved external symbol __imp_CreateFontA
2>fpdfdoc.lib(doc_form.obj) : error LNK2019: unresolved external symbol __imp_CreateFontW referenced in function "public: static class CPDF_Font * __cdecl CPDF_InterForm::AddSystemFont(class CPDF_Document const *,class CFX_WideString,unsigned char)" (?AddSystemFont#CPDF_InterForm##SAPEAVCPDF_Font##PEBVCPDF_Document##VCFX_WideString##E#Z)
2>fxge.lib(fx_win32_print.obj) : error LNK2001: unresolved external symbol __imp_DeleteObject
2>fpdfdoc.lib(doc_form.obj) : error LNK2001: unresolved external symbol __imp_DeleteObject
2>fpdfapi.lib(fpdf_edit_doc.obj) : error LNK2001: unresolved external symbol __imp_DeleteObject
2>fxge.lib(fx_win32_device.obj) : error LNK2001: unresolved external symbol __imp_DeleteObject
2>fxge.lib(fx_win32_dib.obj) : error LNK2001: unresolved external symbol __imp_DeleteObject
2>fpdfdoc.lib(doc_form.obj) : error LNK2019: unresolved external symbol __imp_EnumFontFamiliesExA referenced in function "int __cdecl RetrieveSpecificFont(struct tagLOGFONTA &)" (?RetrieveSpecificFont##YAHAEAUtagLOGFONTA###Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2001: unresolved external symbol __imp_EnumFontFamiliesExA
2>fpdfdoc.lib(doc_form.obj) : error LNK2019: unresolved external symbol __imp_GetStockObject referenced in function "int __cdecl RetrieveStockFont(int,unsigned char,struct tagLOGFONTA &)" (?RetrieveStockFont##YAHHEAEAUtagLOGFONTA###Z)
2>fpdfdoc.lib(doc_form.obj) : error LNK2019: unresolved external symbol __imp_GetObjectA referenced in function "public: static class CPDF_Font * __cdecl CPDF_InterForm::AddSystemFont(class CPDF_Document const *,class CFX_ByteString,unsigned char)" (?AddSystemFont#CPDF_InterForm##SAPEAVCPDF_Font##PEBVCPDF_Document##VCFX_ByteString##E#Z)
2>fpdfdoc.lib(doc_form.obj) : error LNK2019: unresolved external symbol __imp_GetObjectW referenced in function "public: static class CPDF_Font * __cdecl CPDF_InterForm::AddSystemFont(class CPDF_Document const *,class CFX_WideString,unsigned char)" (?AddSystemFont#CPDF_InterForm##SAPEAVCPDF_Font##PEBVCPDF_Document##VCFX_WideString##E#Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2001: unresolved external symbol __imp_GetObjectW
2>fxge.lib(fx_win32_dib.obj) : error LNK2001: unresolved external symbol __imp_GetObjectW
2>fxge.lib(fx_win32_dwrite.obj) : error LNK2001: unresolved external symbol __imp_GetObjectW
2>fpdfdoc.lib(doc_form.obj) : error LNK2019: unresolved external symbol __imp_GetDC referenced in function "int __cdecl RetrieveSpecificFont(struct tagLOGFONTA &)" (?RetrieveSpecificFont##YAHAEAUtagLOGFONTA###Z)
2>fpdfdoc.lib(doc_form.obj) : error LNK2019: unresolved external symbol __imp_ReleaseDC referenced in function "int __cdecl RetrieveSpecificFont(struct tagLOGFONTA &)" (?RetrieveSpecificFont##YAHAEAUtagLOGFONTA###Z)
2>fpdfapi.lib(fpdf_edit_doc.obj) : error LNK2019: unresolved external symbol __imp_CreateCompatibleDC referenced in function "public: class CPDF_Font * __cdecl CPDF_Document::AddWindowsFont(struct tagLOGFONTA *,int,int)" (?AddWindowsFont#CPDF_Document##QEAAPEAVCPDF_Font##PEAUtagLOGFONTA##HH#Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2001: unresolved external symbol __imp_CreateCompatibleDC
2>fxge.lib(fx_win32_dib.obj) : error LNK2001: unresolved external symbol __imp_CreateCompatibleDC
2>fpdfapi.lib(fpdf_edit_doc.obj) : error LNK2019: unresolved external symbol __imp_CreateFontIndirectA referenced in function "public: class CPDF_Font * __cdecl CPDF_Document::AddWindowsFont(struct tagLOGFONTA *,int,int)" (?AddWindowsFont#CPDF_Document##QEAAPEAVCPDF_Font##PEAUtagLOGFONTA##HH#Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2001: unresolved external symbol __imp_CreateFontIndirectA
2>fpdfapi.lib(fpdf_edit_doc.obj) : error LNK2019: unresolved external symbol __imp_DeleteDC referenced in function "public: class CPDF_Font * __cdecl CPDF_Document::AddWindowsFont(struct tagLOGFONTA *,int,int)" (?AddWindowsFont#CPDF_Document##QEAAPEAVCPDF_Font##PEAUtagLOGFONTA##HH#Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2001: unresolved external symbol __imp_DeleteDC
2>fxge.lib(fx_win32_dib.obj) : error LNK2001: unresolved external symbol __imp_DeleteDC
2>fpdfapi.lib(fpdf_edit_doc.obj) : error LNK2019: unresolved external symbol __imp_GetCharWidthW referenced in function "public: class CPDF_Font * __cdecl CPDF_Document::AddWindowsFont(struct tagLOGFONTA *,int,int)" (?AddWindowsFont#CPDF_Document##QEAAPEAVCPDF_Font##PEAUtagLOGFONTA##HH#Z)
2>fpdfapi.lib(fpdf_edit_doc.obj) : error LNK2019: unresolved external symbol __imp_GetFontData referenced in function "class CFX_ByteString __cdecl _FPDF_GetPSNameFromTT(struct HDC__ *)" (?_FPDF_GetPSNameFromTT##YA?AVCFX_ByteString##PEAUHDC__###Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2001: unresolved external symbol __imp_GetFontData
2>fpdfapi.lib(fpdf_edit_doc.obj) : error LNK2019: unresolved external symbol __imp_GetOutlineTextMetricsW referenced in function "public: class CPDF_Font * __cdecl CPDF_Document::AddWindowsFont(struct tagLOGFONTA *,int,int)" (?AddWindowsFont#CPDF_Document##QEAAPEAVCPDF_Font##PEAUtagLOGFONTA##HH#Z)
2>fpdfapi.lib(fpdf_edit_doc.obj) : error LNK2019: unresolved external symbol __imp_SelectObject referenced in function "public: class CPDF_Font * __cdecl CPDF_Document::AddWindowsFont(struct tagLOGFONTA *,int,int)" (?AddWindowsFont#CPDF_Document##QEAAPEAVCPDF_Font##PEAUtagLOGFONTA##HH#Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2001: unresolved external symbol __imp_SelectObject
2>fxge.lib(fx_win32_dib.obj) : error LNK2001: unresolved external symbol __imp_SelectObject
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_BitBlt referenced in function "protected: virtual int __cdecl CGdiDisplayDriver::GetDIBits(class CFX_DIBitmap *,int,int,void *,int)" (?GetDIBits#CGdiDisplayDriver##MEAAHPEAVCFX_DIBitmap##HHPEAXH#Z)
2>fxge.lib(fx_win32_dib.obj) : error LNK2001: unresolved external symbol __imp_BitBlt
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_CreateBitmap referenced in function "protected: __cdecl CGdiDeviceDriver::CGdiDeviceDriver(struct HDC__ *,int)" (??0CGdiDeviceDriver##IEAA#PEAUHDC__##H#Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_CreateCompatibleBitmap referenced in function "protected: virtual int __cdecl CGdiDisplayDriver::GetDIBits(class CFX_DIBitmap *,int,int,void *,int)" (?GetDIBits#CGdiDisplayDriver##MEAAHPEAVCFX_DIBitmap##HHPEAXH#Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_CreatePen referenced in function "protected: virtual int __cdecl CGdiDeviceDriver::DrawCosmeticLine(float,float,float,float,unsigned int,int,void *,int)" (?DrawCosmeticLine#CGdiDeviceDriver##MEAAHMMMMIHPEAXH#Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_CreateRectRgn referenced in function "protected: virtual void * __cdecl CGdiDeviceDriver::GetClipRgn(void)" (?GetClipRgn#CGdiDeviceDriver##MEAAPEAXXZ)
2>fxge.lib(fx_win32_print.obj) : error LNK2001: unresolved external symbol __imp_CreateRectRgn
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_CreateSolidBrush referenced in function "protected: virtual int __cdecl CGdiDeviceDriver::FillRect(struct FX_RECT const *,unsigned int,int,void *,int)" (?FillRect#CGdiDeviceDriver##MEAAHPEBUFX_RECT##IHPEAXH#Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_ExtEscape referenced in function "int __cdecl GetPSLevel(struct HDC__ *)" (?GetPSLevel##YAHPEAUHDC__###Z)
2>fxge.lib(fx_win32_print.obj) : error LNK2001: unresolved external symbol __imp_ExtEscape
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_GetClipBox referenced in function "protected: virtual int __cdecl CGdiDeviceDriver::GetClipBox(struct FX_RECT *)" (?GetClipBox#CGdiDeviceDriver##MEAAHPEAUFX_RECT###Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_GetClipRgn referenced in function "protected: virtual void * __cdecl CGdiDeviceDriver::GetClipRgn(void)" (?GetClipRgn#CGdiDeviceDriver##MEAAPEAXXZ)
2>fxge.lib(fx_win32_print.obj) : error LNK2001: unresolved external symbol __imp_GetClipRgn
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_GetDeviceCaps referenced in function "protected: __cdecl CGdiDeviceDriver::CGdiDeviceDriver(struct HDC__ *,int)" (??0CGdiDeviceDriver##IEAA#PEAUHDC__##H#Z)
2>fxge.lib(fx_win32_print.obj) : error LNK2001: unresolved external symbol __imp_GetDeviceCaps
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_GetDIBits referenced in function "protected: virtual int __cdecl CGdiDisplayDriver::GetDIBits(class CFX_DIBitmap *,int,int,void *,int)" (?GetDIBits#CGdiDisplayDriver##MEAAHPEAVCFX_DIBitmap##HHPEAXH#Z)
2>fxge.lib(fx_win32_dib.obj) : error LNK2001: unresolved external symbol __imp_GetDIBits
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_GetObjectType referenced in function "protected: __cdecl CGdiDeviceDriver::CGdiDeviceDriver(struct HDC__ *,int)" (??0CGdiDeviceDriver##IEAA#PEAUHDC__##H#Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_IntersectClipRect referenced in function "protected: virtual int __cdecl CGdiDeviceDriver::SetClip_PathFill(class CFX_PathData const *,class CFX_Matrix const *,int)" (?SetClip_PathFill#CGdiDeviceDriver##MEAAHPEBVCFX_PathData##PEBVCFX_Matrix##H#Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_LineTo referenced in function "protected: virtual int __cdecl CGdiDeviceDriver::DrawCosmeticLine(float,float,float,float,unsigned int,int,void *,int)" (?DrawCosmeticLine#CGdiDeviceDriver##MEAAHMMMMIHPEAXH#Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_RestoreDC referenced in function "protected: virtual void __cdecl CGdiDeviceDriver::RestoreState(int)" (?RestoreState#CGdiDeviceDriver##MEAAXH#Z)
2>fxge.lib(fx_win32_print.obj) : error LNK2001: unresolved external symbol __imp_RestoreDC
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_SaveDC referenced in function "protected: virtual void __cdecl CGdiDeviceDriver::RestoreState(int)" (?RestoreState#CGdiDeviceDriver##MEAAXH#Z)
2>fxge.lib(fx_win32_print.obj) : error LNK2001: unresolved external symbol __imp_SaveDC
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_SelectClipRgn referenced in function "protected: virtual int __cdecl CGdiDeviceDriver::SetClipRgn(void *)" (?SetClipRgn#CGdiDeviceDriver##MEAAHPEAX#Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_SetDIBitsToDevice referenced in function "protected: int __cdecl CGdiDeviceDriver::GDI_SetDIBits(class CFX_DIBitmap const *,struct FX_RECT const *,int,int,void *)" (?GDI_SetDIBits#CGdiDeviceDriver##IEAAHPEBVCFX_DIBitmap##PEBUFX_RECT##HHPEAX#Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_SetPolyFillMode referenced in function "protected: virtual int __cdecl CGdiDeviceDriver::DrawPath(class CFX_PathData const *,class CFX_Matrix const *,class CFX_GraphStateData const *,unsigned int,unsigned int,int,int,void *,int)" (?DrawPath#CGdiDeviceDriver##MEAAHPEBVCFX_PathData##PEBVCFX_Matrix##PEBVCFX_GraphStateData##IIHHPEAXH#Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_StretchDIBits referenced in function "protected: int __cdecl CGdiDeviceDriver::GDI_SetDIBits(class CFX_DIBitmap const *,struct FX_RECT const *,int,int,void *)" (?GDI_SetDIBits#CGdiDeviceDriver##IEAAHPEBVCFX_DIBitmap##PEBUFX_RECT##HHPEAX#Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_SetStretchBltMode referenced in function "protected: __cdecl CGdiDeviceDriver::CGdiDeviceDriver(struct HDC__ *,int)" (??0CGdiDeviceDriver##IEAA#PEAUHDC__##H#Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_GetTextMetricsW referenced in function "public: virtual int __cdecl CWin32FontInfo::GetFontCharset(void *,int &)" (?GetFontCharset#CWin32FontInfo##UEAAHPEAXAEAH#Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_CreateDIBSection referenced in function "public: __cdecl CFX_WinBitmapDevice::CFX_WinBitmapDevice(int,int,enum FXDIB_Format)" (??0CFX_WinBitmapDevice##QEAA#HHW4FXDIB_Format###Z)
2>fxge.lib(fx_win32_dib.obj) : error LNK2001: unresolved external symbol __imp_CreateDIBSection
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_BeginPath referenced in function "void __cdecl _SetPathToDC(struct HDC__ *,class CFX_PathData const *,class CFX_Matrix const *)" (?_SetPathToDC##YAXPEAUHDC__##PEBVCFX_PathData##PEBVCFX_Matrix###Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_CloseFigure referenced in function "void __cdecl _SetPathToDC(struct HDC__ *,class CFX_PathData const *,class CFX_Matrix const *)" (?_SetPathToDC##YAXPEAUHDC__##PEBVCFX_PathData##PEBVCFX_Matrix###Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_EndPath referenced in function "void __cdecl _SetPathToDC(struct HDC__ *,class CFX_PathData const *,class CFX_Matrix const *)" (?_SetPathToDC##YAXPEAUHDC__##PEBVCFX_PathData##PEBVCFX_Matrix###Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_FillPath referenced in function "protected: virtual int __cdecl CGdiDeviceDriver::DrawPath(class CFX_PathData const *,class CFX_Matrix const *,class CFX_GraphStateData const *,unsigned int,unsigned int,int,int,void *,int)" (?DrawPath#CGdiDeviceDriver##MEAAHPEBVCFX_PathData##PEBVCFX_Matrix##PEBVCFX_GraphStateData##IIHHPEAXH#Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_SelectClipPath referenced in function "protected: virtual int __cdecl CGdiDeviceDriver::SetClip_PathFill(class CFX_PathData const *,class CFX_Matrix const *,int)" (?SetClip_PathFill#CGdiDeviceDriver##MEAAHPEBVCFX_PathData##PEBVCFX_Matrix##H#Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_SetMiterLimit referenced in function "protected: virtual int __cdecl CGdiDeviceDriver::DrawPath(class CFX_PathData const *,class CFX_Matrix const *,class CFX_GraphStateData const *,unsigned int,unsigned int,int,int,void *,int)" (?DrawPath#CGdiDeviceDriver##MEAAHPEBVCFX_PathData##PEBVCFX_Matrix##PEBVCFX_GraphStateData##IIHHPEAXH#Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_StrokeAndFillPath referenced in function "protected: virtual int __cdecl CGdiDeviceDriver::DrawPath(class CFX_PathData const *,class CFX_Matrix const *,class CFX_GraphStateData const *,unsigned int,unsigned int,int,int,void *,int)" (?DrawPath#CGdiDeviceDriver##MEAAHPEBVCFX_PathData##PEBVCFX_Matrix##PEBVCFX_GraphStateData##IIHHPEAXH#Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_StrokePath referenced in function "protected: virtual int __cdecl CGdiDeviceDriver::DrawPath(class CFX_PathData const *,class CFX_Matrix const *,class CFX_GraphStateData const *,unsigned int,unsigned int,int,int,void *,int)" (?DrawPath#CGdiDeviceDriver##MEAAHPEBVCFX_PathData##PEBVCFX_Matrix##PEBVCFX_GraphStateData##IIHHPEAXH#Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_WidenPath referenced in function "protected: virtual int __cdecl CGdiDeviceDriver::SetClip_PathStroke(class CFX_PathData const *,class CFX_Matrix const *,class CFX_GraphStateData const *)" (?SetClip_PathStroke#CGdiDeviceDriver##MEAAHPEBVCFX_PathData##PEBVCFX_Matrix##PEBVCFX_GraphStateData###Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_ExtCreatePen referenced in function "struct HPEN__ * __cdecl _CreatePen(class CFX_GraphStateData const *,class CFX_Matrix const *,unsigned int)" (?_CreatePen##YAPEAUHPEN__##PEBVCFX_GraphStateData##PEBVCFX_Matrix##I#Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_MoveToEx referenced in function "protected: virtual int __cdecl CGdiDeviceDriver::DrawCosmeticLine(float,float,float,float,unsigned int,int,void *,int)" (?DrawCosmeticLine#CGdiDeviceDriver##MEAAHMMMMIHPEAXH#Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_PolyBezierTo referenced in function "void __cdecl _SetPathToDC(struct HDC__ *,class CFX_PathData const *,class CFX_Matrix const *)" (?_SetPathToDC##YAXPEAUHDC__##PEBVCFX_PathData##PEBVCFX_Matrix###Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_GetTextFaceA referenced in function "public: virtual int __cdecl CWin32FontInfo::GetFaceName(void *,class CFX_ByteString &)" (?GetFaceName#CWin32FontInfo##UEAAHPEAXAEAVCFX_ByteString###Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_FillRect referenced in function "protected: virtual int __cdecl CGdiDeviceDriver::FillRect(struct FX_RECT const *,unsigned int,int,void *,int)" (?FillRect#CGdiDeviceDriver##MEAAHPEBUFX_RECT##IHPEAXH#Z)
2>fxge.lib(fx_win32_dib.obj) : error LNK2019: unresolved external symbol __imp_CreateDIBitmap referenced in function "public: static struct HBITMAP__ * __cdecl CFX_WindowsDIB::GetDDBitmap(class CFX_DIBitmap const *,struct HDC__ *)" (?GetDDBitmap#CFX_WindowsDIB##SAPEAUHBITMAP__##PEBVCFX_DIBitmap##PEAUHDC__###Z)
2>fxge.lib(fx_win32_dib.obj) : error LNK2019: unresolved external symbol __imp_LoadImageW referenced in function "public: static class CFX_DIBitmap * __cdecl CFX_WindowsDIB::LoadDIBitmap(struct WINDIB_Open_Args_)" (?LoadDIBitmap#CFX_WindowsDIB##SAPEAVCFX_DIBitmap##UWINDIB_Open_Args_###Z)
2>fxge.lib(fx_win32_dwrite.obj) : error LNK2019: unresolved external symbol __imp_GetCurrentObject referenced in function "public: long __cdecl CDwGdiTextRenderer::DrawGlyphRun(struct FX_RECT const &,class CFX_ClipRgn *,struct DWRITE_MATRIX const *,float,float,enum DWRITE_MEASURING_MODE,struct DWRITE_GLYPH_RUN const *,unsigned long const &)" (?DrawGlyphRun#CDwGdiTextRenderer##QEAAJAEBUFX_RECT##PEAVCFX_ClipRgn##PEBUDWRITE_MATRIX##MMW4DWRITE_MEASURING_MODE##PEBUDWRITE_GLYPH_RUN##AEBK#Z)
2>fxge.lib(fx_win32_print.obj) : error LNK2019: unresolved external symbol __imp_GetRegionData referenced in function "public: int __cdecl CPSPrinterDriver::Init(struct HDC__ *,int,int)" (?Init#CPSPrinterDriver##QEAAHPEAUHDC__##HH#Z)
2>\build\Debug\pdfium.dll : fatal error LNK1120: 57 unresolved externals
========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Does anyone have an idea on what I am supposed to do?
I downloaded and build pdfium as described in https://github.com/pvginkel/PdfiumViewer. My steps:
Download pdfium
Generate Visual Studio projects and solution
Open solution all.sln
Build all.sln, error LNK1112. I change target machine for project pdfium to /MACHINE:x86. Now all is ok, I get static lib
I change pdfium project type to dll
Add FPDFSDK_EXPORTS to preprocessor definitions
Add dependencies as described in https://github.com/pvginkel/PdfiumViewer
I change toolset to v120_xp
Build, linker errors. I change library list to (all libraries from $(OutDir)):
kernel32.lib
user32.lib
advapi32.lib
gdi32.lib
winmm.lib
$(OutDir)\lib\bigint.lib
$(OutDir)\lib\fdrm.lib
$(OutDir)\lib\formfiller.lib
$(OutDir)\lib\fpdfapi.lib
$(OutDir)\lib\fpdfdoc.lib
$(OutDir)\lib\fpdftext.lib
$(OutDir)\lib\freetype.lib
$(OutDir)\lib\fx_lpng.lib
$(OutDir)\lib\fxcodec.lib
$(OutDir)\lib\fxcrt.lib
$(OutDir)\lib\fxedit.lib
$(OutDir)\lib\fxge.lib
$(OutDir)\lib\gmock.lib
$(OutDir)\lib\gtest.lib
$(OutDir)\lib\gtest_main.lib
$(OutDir)\lib\icui18n.lib
$(OutDir)\lib\icuuc.lib
$(OutDir)\lib\javascript.lib
$(OutDir)\lib\jsapi.lib
$(OutDir)\lib\pdfwindow.lib
$(OutDir)\lib\v8_base_0.lib
$(OutDir)\lib\v8_base_1.lib
$(OutDir)\lib\v8_base_2.lib
$(OutDir)\lib\v8_base_3.lib
$(OutDir)\lib\v8_libbase.lib
$(OutDir)\lib\v8_libplatform.lib
$(OutDir)\lib\v8_nosnapshot.lib
$(OutDir)\lib\v8_snapshot.lib
Buil, Now all is ok, I get dynamic lib (dll)
I download file pdfiumviewer.cpp and add it to project
Build, compilation error, no header file found
Add third_party\freetype\include;v8;v8\include; to addition include directories
Build, compilation error.
In file pdfiumviewer.cpp replace string #include "../../fpdfsdk/include/fpdfview.h" to #include "../../public/fpdfview.h"
Build, now all is ok, I get dynamic lib (dll)
One more thing, if you want build pdfium_test project, you need fix fpdfview.h file:
#define DLLEXPORT __declspec( dllexport )
#define STDCALL __stdcall
#else
#define DLLEXPORT
#if !defined(_WIN64)
// On Windows Win32 (not x64) requires __stdcall convention
#define STDCALL __stdcall
#else
#define STDCALL
#endif // !defined(_WIN64)
#endif
For build pdfium_embeddertests you can just turn off Treat warnings as errors option, but I do not know about consequences.
If anyone is still looking for an answer to this, an alternate is to just download the precompiled libraries.
https://github.com/bblanchon/pdfium-binaries/ generates the latest binaries from the chromium source for Linux, Windows, Mac.

dll issue using Qt in Visual Studio 2012

I am a newbie building stuffs on Visual Studio and now I am facing this little problem that I am not able to solve. I correctly installed Qt and used the correct paths on the "VC++ Directories" property of my project (indeed in my code the include are correctly seen). The next step should be to put the correct stuffs in the "linker" of my project.. this is at least what I think the problem consists on. Anyway, I have 100 error of this kind:
error LNK2001: unresolved external symbol "__declspec(dllimport) protected: virtual void __thiscall QObject::disconnectNotify(class QMetaMethod const &)" (__imp_?disconnectNotify#QObject##MAEXABVQMetaMethod###Z) C:\Users\Henry\Desktop\PhotonMapping\PhotonMapping\main.obj PhotonMapping
error LNK2001: unresolved external symbol "__declspec(dllimport) protected: virtual void __thiscall QObject::connectNotify(class QMetaMethod const &)" (__imp_?connectNotify#QObject##MAEXABVQMetaMethod###Z) C:\Users\Henry\Desktop\PhotonMapping\PhotonMapping\main.obj PhotonMapping
error LNK2001: unresolved external symbol "__declspec(dllimport) protected: virtual void __thiscall QObject::customEvent(class QEvent *)" (__imp_?customEvent#QObject##MAEXPAVQEvent###Z) C:\Users\Henry\Desktop\PhotonMapping\PhotonMapping\main.obj PhotonMapping
error LNK2001: unresolved external symbol "__declspec(dllimport) protected: virtual void __thiscall QObject::childEvent(class QChildEvent *)" (__imp_?childEvent#QObject##MAEXPAVQChildEvent###Z) C:\Users\Henry\Desktop\PhotonMapping\PhotonMapping\main.obj PhotonMapping
error LNK2001: unresolved external symbol "__declspec(dllimport) protected: virtual void __thiscall QObject::timerEvent(class QTimerEvent *)" (__imp_?timerEvent#QObject##MAEXPAVQTimerEvent###Z) C:\Users\Henry\Desktop\PhotonMapping\PhotonMapping\main.obj PhotonMapping
error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual bool __thiscall QObject::eventFilter(class QObject *,class QEvent *)" (__imp_?eventFilter#QObject##UAE_NPAV1#PAVQEvent###Z) C:\Users\Henry\Desktop\PhotonMapping\PhotonMapping\main.obj PhotonMapping
error LNK2001: unresolved external symbol "__declspec(dllimport) double * __cdecl annAllocPt(int,double)" (__imp_?annAllocPt##YAPANHN#Z) C:\Users\Henry\Desktop\PhotonMapping\PhotonMapping\main.obj PhotonMapping
error LNK2001: unresolved external symbol "__declspec(dllimport) protected: virtual int __thiscall QImage::metric(enum QPaintDevice::PaintDeviceMetric)const " (__imp_?metric#QImage##MBEHW4PaintDeviceMetric#QPaintDevice###Z) C:\Users\Henry\Desktop\PhotonMapping\PhotonMapping\main.obj PhotonMapping
error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class QPaintEngine * __thiscall QImage::paintEngine(void)const " (__imp_?paintEngine#QImage##UBEPAVQPaintEngine##XZ) C:\Users\Henry\Desktop\PhotonMapping\PhotonMapping\main.obj PhotonMapping
error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall QImage::setPixel(int,int,unsigned int)" (__imp_?setPixel#QImage##QAEXHHI#Z) C:\Users\Henry\Desktop\PhotonMapping\PhotonMapping\main.obj PhotonMapping
error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual int __thiscall QImage::devType(void)const " (__imp_?devType#QImage##UBEHXZ) C:\Users\Henry\Desktop\PhotonMapping\PhotonMapping\main.obj PhotonMapping
error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall QImage::~QImage(void)" (__imp_??1QImage##UAE#XZ) C:\Users\Henry\Desktop\PhotonMapping\PhotonMapping\main.obj PhotonMapping
error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QImage::QImage(int,int,enum QImage::Format)" (__imp_??0QImage##QAE#HHW4Format#0##Z) C:\Users\Henry\Desktop\PhotonMapping\PhotonMapping\main.obj PhotonMapping
error LNK2001: unresolved external symbol "__declspec(dllimport) double * * __cdecl annAllocPts(int,int)" (__imp_?annAllocPts##YAPAPANHH#Z) C:\Users\Henry\Desktop\PhotonMapping\PhotonMapping\main.obj PhotonMapping
error LNK2001: unresolved external symbol "__declspec(dllimport) public: static int __cdecl QApplication::exec(void)" (__imp_?exec#QApplication##SAHXZ) C:\Users\Henry\Desktop\PhotonMapping\PhotonMapping\main.obj PhotonMapping
error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall QApplication::~QApplication(void)" (__imp_??1QApplication##UAE#XZ) C:\Users\Henry\Desktop\PhotonMapping\PhotonMapping\main.obj PhotonMapping
error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QApplication::QApplication(int &,char * *,int)" (__imp_??0QApplication##QAE#AAHPAPADH#Z) C:\Users\Henry\Desktop\PhotonMapping\PhotonMapping\main.obj PhotonMapping
I know that the problem is stupid but I would like to understand it.. in such a way to learn how to solve it the next time I am going to face it. Thanks in advance!
Enrico

Compiling 32 bit code to 64 bit

I was given an assignment to compile a 3d Max plugin in 64 bit.
Project compiles properly under 32 bits, but when I follow the instructions from here:
How to compile a 64-bit application using Visual C++ 2010 Express?
to setup compile platform to x64. The project compiles, but when Generating Code I get linker errors:
1>DllEntry.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl InitCustomControls(struct HINSTANCE__ *)" (__imp_?InitCustomControls##YAXPEAUHINSTANCE__###Z) referenced in function DllMain
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __cdecl Matrix3::IdentityMatrix(void)" (__imp_?IdentityMatrix#Matrix3##QEAAXXZ) referenced in function "public: __cdecl Matrix3::Matrix3(int)" (??0Matrix3##QEAA#H#Z)
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static void __cdecl MaxHeapOperators::operator delete(void *)" (__imp_??3MaxHeapOperators##SAXPEAX#Z) referenced in function "public: virtual void * __cdecl SceneExport::`scalar deleting destructor'(unsigned int)" (??_GSceneExport##UEAAPEAXI#Z)
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl ClassDesc2::ClassDesc2(void)" (__imp_??0ClassDesc2##QEAA#XZ) referenced in function "public: __cdecl CMaxExporterClassDesc::CMaxExporterClassDesc(void)" (??0CMaxExporterClassDesc##QEAA#XZ)
1>exporter.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ClassDesc2::ResetClassParams(int)" (?ResetClassParams#ClassDesc2##UEAAXH#Z)
1>exporter.obj : error LNK2001: unresolved external symbol "public: virtual int __cdecl ClassDesc2::NumParamBlockDescs(void)" (?NumParamBlockDescs#ClassDesc2##UEAAHXZ)
1>exporter.obj : error LNK2001: unresolved external symbol "public: virtual class ParamBlockDesc2 * __cdecl ClassDesc2::GetParamBlockDesc(int)" (?GetParamBlockDesc#ClassDesc2##UEAAPEAVParamBlockDesc2##H#Z)
1>exporter.obj : error LNK2001: unresolved external symbol "public: virtual class ParamBlockDesc2 * __cdecl ClassDesc2::GetParamBlockDescByID(short)" (?GetParamBlockDescByID#ClassDesc2##UEAAPEAVParamBlockDesc2##F#Z)
1>exporter.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ClassDesc2::AddParamBlockDesc(class ParamBlockDesc2 *)" (?AddParamBlockDesc#ClassDesc2##UEAAXPEAVParamBlockDesc2###Z)
1>exporter.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ClassDesc2::BeginEditParams(class IObjParam *,class ReferenceMaker *,unsigned long,class Animatable *)" (?BeginEditParams#ClassDesc2##UEAAXPEAVIObjParam##PEAVReferenceMaker##KPEAVAnimatable###Z)
1>exporter.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ClassDesc2::EndEditParams(class IObjParam *,class ReferenceMaker *,unsigned long,class Animatable *)" (?EndEditParams#ClassDesc2##UEAAXPEAVIObjParam##PEAVReferenceMaker##KPEAVAnimatable###Z)
1>exporter.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ClassDesc2::InvalidateUI(class ParamBlockDesc2 *)" (?InvalidateUI#ClassDesc2##UEAAXPEAVParamBlockDesc2###Z)
1>exporter.obj : error LNK2001: unresolved external symbol "public: virtual char * __cdecl ClassDesc::GetRsrcString(__int64)" (?GetRsrcString#ClassDesc##UEAAPEAD_J#Z)
1>exporter.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ClassDesc2::MakeAutoParamBlocks(class ReferenceMaker *)" (?MakeAutoParamBlocks#ClassDesc2##UEAAXPEAVReferenceMaker###Z)
1>exporter.obj : error LNK2001: unresolved external symbol "public: virtual int __cdecl ClassDesc2::NumParamMaps(void)" (?NumParamMaps#ClassDesc2##UEAAHXZ)
1>exporter.obj : error LNK2001: unresolved external symbol "public: virtual class IParamMap2 * __cdecl ClassDesc2::GetParamMap(int)" (?GetParamMap#ClassDesc2##UEAAPEAVIParamMap2##H#Z)
1>exporter.obj : error LNK2001: unresolved external symbol "public: virtual class FPInterface * __cdecl ClassDesc::GetInterface(char *)" (?GetInterface#ClassDesc##UEAAPEAVFPInterface##PEAD#Z)
1>exporter.obj : error LNK2001: unresolved external symbol "public: virtual class FPInterface * __cdecl ClassDesc::GetInterface(class Interface_ID)" (?GetInterface#ClassDesc##UEAAPEAVFPInterface##VInterface_ID###Z)
1>exporter.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ClassDesc::AddInterface(class FPInterface *)" (?AddInterface#ClassDesc##UEAAXPEAVFPInterface###Z)
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __cdecl ClassDesc2::SetUserDlgProc(class ParamBlockDesc2 *,short,class ParamMap2UserDlgProc *)" (__imp_?SetUserDlgProc#ClassDesc2##QEAAXPEAVParamBlockDesc2##FPEAVParamMap2UserDlgProc###Z) referenced in function "public: virtual void __cdecl ClassDesc2::SetUserDlgProc(class ParamBlockDesc2 *,class ParamMap2UserDlgProc *)" (?SetUserDlgProc#ClassDesc2##UEAAXPEAVParamBlockDesc2##PEAVParamMap2UserDlgProc###Z)
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl ClassDesc2::~ClassDesc2(void)" (__imp_??1ClassDesc2##UEAA#XZ) referenced in function "public: virtual __cdecl CMaxExporterClassDesc::~CMaxExporterClassDesc(void)" (??1CMaxExporterClassDesc##UEAA#XZ)
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl zfree(void * *)" (__imp_?zfree##YAXPEAPEAX#Z) referenced in function "public: __cdecl Tab<class Point3>::~Tab<class Point3>(void)" (??1?$Tab#VPoint3####QEAA#XZ)
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl TBSetCount(struct TabHdr * *,int,int,int)" (__imp_?TBSetCount##YAXPEAPEAUTabHdr##HHH#Z) referenced in function "public: void __cdecl Tab<class Point3>::SetCount(int,int)" (?SetCount#?$Tab#VPoint3####QEAAXHH#Z)
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) class Point3 __cdecl Normalize(class Point3 const &)" (__imp_?Normalize##YA?AVPoint3##AEBV1##Z) referenced in function "public: void __cdecl VNormal::Normalize(void)" (?Normalize#VNormal##QEAAXXZ)
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class TVFace * __cdecl Mesh::mapFaces(int)const " (__imp_?mapFaces#Mesh##QEBAPEAVTVFace##H#Z) referenced in function "protected: void __cdecl CMaxExporter::ExportColors(class INode *,class Mesh &,struct pmesh::mesh_desc &)" (?ExportColors#CMaxExporter##IEAAXPEAVINode##AEAVMesh##AEAUmesh_desc#pmesh###Z)
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class Point3 * __cdecl Mesh::mapVerts(int)const " (__imp_?mapVerts#Mesh##QEBAPEAVPoint3##H#Z) referenced in function "protected: void __cdecl CMaxExporter::ExportColors(class INode *,class Mesh &,struct pmesh::mesh_desc &)" (?ExportColors#CMaxExporter##IEAAXPEAVINode##AEAVMesh##AEAUmesh_desc#pmesh###Z)
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) class Point3 __cdecl operator*(class Point3 const &,class Matrix3 const &)" (__imp_??D#YA?AVPoint3##AEBV0#AEBVMatrix3###Z) referenced in function "protected: void __cdecl CMaxExporter::ExportVertices(class INode *,class Mesh &,struct pmesh::mesh_desc &)" (?ExportVertices#CMaxExporter##IEAAXPEAVINode##AEAVMesh##AEAUmesh_desc#pmesh###Z)
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl ApplyScaling(class Matrix3 &,class ScaleValue const &)" (__imp_?ApplyScaling##YAXAEAVMatrix3##AEBVScaleValue###Z) referenced in function "protected: void __cdecl CMaxExporter::ExportVertices(class INode *,class Mesh &,struct pmesh::mesh_desc &)" (?ExportVertices#CMaxExporter##IEAAXPEAVINode##AEAVMesh##AEAUmesh_desc#pmesh###Z)
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl PreRotateMatrix(class Matrix3 &,class Quat const &)" (__imp_?PreRotateMatrix##YAXAEAVMatrix3##AEBVQuat###Z) referenced in function "protected: void __cdecl CMaxExporter::ExportVertices(class INode *,class Mesh &,struct pmesh::mesh_desc &)" (?ExportVertices#CMaxExporter##IEAAXPEAVINode##AEAVMesh##AEAUmesh_desc#pmesh###Z)
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __cdecl Matrix3::PreTranslate(class Point3 const &)" (__imp_?PreTranslate#Matrix3##QEAAXAEBVPoint3###Z) referenced in function "protected: void __cdecl CMaxExporter::ExportVertices(class INode *,class Mesh &,struct pmesh::mesh_desc &)" (?ExportVertices#CMaxExporter##IEAAXPEAVINode##AEAVMesh##AEAUmesh_desc#pmesh###Z)
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __cdecl Matrix3::SetRow(int,class Point3)" (__imp_?SetRow#Matrix3##QEAAXHVPoint3###Z) referenced in function "protected: void __cdecl CMaxExporter::ExportNormalsTangents(class INode *,class Mesh &,struct pmesh::mesh_desc &)" (?ExportNormalsTangents#CMaxExporter##IEAAXPEAVINode##AEAVMesh##AEAUmesh_desc#pmesh###Z)
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class Point3 __cdecl Point3::operator^(class Point3 const &)const " (__imp_??TPoint3##QEBA?AV0#AEBV0##Z) referenced in function "protected: void __cdecl CMaxExporter::ExportNormalsTangents(class INode *,class Mesh &,struct pmesh::mesh_desc &)" (?ExportNormalsTangents#CMaxExporter##IEAAXPEAVINode##AEAVMesh##AEAUmesh_desc#pmesh###Z)
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl CStr::operator char *(void)" (__imp_??BCStr##QEAAPEADXZ) referenced in function "protected: void __cdecl CMaxExporter::Log(char const *,struct pmesh::mesh_file &)" (?Log#CMaxExporter##IEAAXPEBDAEAUmesh_file#pmesh###Z)
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static void * __cdecl MaxHeapOperators::operator new(unsigned __int64)" (__imp_??2MaxHeapOperators##SAPEAX_K#Z) referenced in function "public: virtual void * __cdecl CMaxExporterClassDesc::Create(int)" (?Create#CMaxExporterClassDesc##UEAAPEAXH#Z)
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl Mesh::~Mesh(void)" (__imp_??1Mesh##UEAA#XZ) referenced in function "protected: void __cdecl CMaxExporter::ExportMesh(class INode *,class Object *,struct pmesh::mesh_node *,bool)" (?ExportMesh#CMaxExporter##IEAAXPEAVINode##PEAVObject##PEAUmesh_node#pmesh##_N#Z)
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: int __cdecl Matrix3::Parity(void)const " (__imp_?Parity#Matrix3##QEBAHXZ) referenced in function "protected: void __cdecl CMaxExporter::ExportMesh(class INode *,class Object *,struct pmesh::mesh_node *,bool)" (?ExportMesh#CMaxExporter##IEAAXPEAVINode##PEAVObject##PEAUmesh_node#pmesh##_N#Z)
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl Mesh::Mesh(class Mesh const &)" (__imp_??0Mesh##QEAA#AEBV0##Z) referenced in function "protected: void __cdecl CMaxExporter::ExportMesh(class INode *,class Object *,struct pmesh::mesh_node *,bool)" (?ExportMesh#CMaxExporter##IEAAXPEAVINode##PEAVObject##PEAUmesh_node#pmesh##_N#Z)
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl DebugPrint(char const *,...)" (__imp_?DebugPrint##YAXPEBDZZ) referenced in function "protected: void __cdecl CMaxExporter::ExportMesh(class INode *,class Object *,struct pmesh::mesh_node *,bool)" (?ExportMesh#CMaxExporter##IEAAXPEAVINode##PEAVObject##PEAUmesh_node#pmesh##_N#Z)
What am I doing wrong?
As a follow-up for anybody having the same problem: You need to select x64 variant of the libraries at the Linker->General->AdditionalLibraryDirectories. Once you install 3Ds MAX SDK with the default options you should have them located at: C:\Program Files (x86)\Autodesk\maxsdk\x64\lib;

VS2010 Linker Error in MFC Dialog Based Project

I recently installed VS2010 Ultimate. I'm trying to create a MFC dialog based program. I use the built in template, take all the default options, and then compile the project. I then get the following link errors.
1>------ Build started: Project: test1, Configuration: Debug Win32 ------
1>test1.obj : error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall CWinApp::GetProfileIntW(wchar_t const *,wchar_t const *,int)" (?GetProfileIntW#CWinApp##UAEIPB_W0H#Z)
1>test1.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CWinApp::WriteProfileInt(wchar_t const *,wchar_t const *,int)" (?WriteProfileInt#CWinApp##UAEHPB_W0H#Z)
1>test1.obj : error LNK2001: unresolved external symbol "public: virtual class ATL::CStringT<wchar_t,class StrTraitMFC<wchar_t,class ATL::ChTraitsCRT<wchar_t> > > __thiscall CWinApp::GetProfileStringW(wchar_t const *,wchar_t const *,wchar_t const *)" (?GetProfileStringW#CWinApp##UAE?AV?$CStringT#_WV?$StrTraitMFC#_WV?$ChTraitsCRT#_W#ATL#####ATL##PB_W00#Z)
1>test1.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CWinApp::WriteProfileStringW(wchar_t const *,wchar_t const *,wchar_t const *)" (?WriteProfileStringW#CWinApp##UAEHPB_W00#Z)
1>test1.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CWinApp::GetProfileBinary(wchar_t const *,wchar_t const *,unsigned char * *,unsigned int *)" (?GetProfileBinary#CWinApp##UAEHPB_W0PAPAEPAI#Z)
1>test1.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CWinApp::WriteProfileBinary(wchar_t const *,wchar_t const *,unsigned char *,unsigned int)" (?WriteProfileBinary#CWinApp##UAEHPB_W0PAEI#Z)
1>test1.obj : error LNK2001: unresolved external symbol "public: virtual class CDocument * __thiscall CWinApp::OpenDocumentFile(wchar_t const *,int)" (?OpenDocumentFile#CWinApp##UAEPAVCDocument##PB_WH#Z)
1>test1.obj : error LNK2001: unresolved external symbol "public: virtual long __thiscall CWinApp::RegisterWithRestartManager(wchar_t const *,unsigned long,unsigned long (__stdcall*)(void *),void *,unsigned long,unsigned long)" (?RegisterWithRestartManager#CWinApp##UAEJPB_WKP6GKPAX#Z1KK#Z)
1>test1.obj : error LNK2001: unresolved external symbol "public: virtual long __thiscall CWinApp::RegisterWithRestartManager(int,class ATL::CStringT<wchar_t,class StrTraitMFC<wchar_t,class ATL::ChTraitsCRT<wchar_t> > > const &)" (?RegisterWithRestartManager#CWinApp##UAEJHABV?$CStringT#_WV?$StrTraitMFC#_WV?$ChTraitsCRT#_W#ATL#####ATL###Z)
1>test1.obj : error LNK2001: unresolved external symbol "public: virtual unsigned long __thiscall CWinApp::ApplicationRecoveryCallback(void *)" (?ApplicationRecoveryCallback#CWinApp##UAEKPAX#Z)
1>test1.obj : error LNK2001: unresolved external symbol "public: virtual class CDataRecoveryHandler * __thiscall CWinApp::GetDataRecoveryHandler(void)" (?GetDataRecoveryHandler#CWinApp##UAEPAVCDataRecoveryHandler##XZ)
1>test1.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CWinApp::IsTaskbarInteractionEnabled(void)" (?IsTaskbarInteractionEnabled#CWinApp##UAEHXZ)
1>test1.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CWinApp::RestartInstance(void)" (?RestartInstance#CWinApp##UAEHXZ)
1>test1.obj : error LNK2019: unresolved external symbol "public: __thiscall CShellManager::CShellManager(void)" (??0CShellManager##QAE#XZ) referenced in function "public: virtual int __thiscall Ctest1App::InitInstance(void)" (?InitInstance#Ctest1App##UAEHXZ)
1>test1.obj : error LNK2019: unresolved external symbol "protected: virtual __thiscall CDialogImpl::~CDialogImpl(void)" (??1CDialogImpl##MAE#XZ) referenced in function "public: virtual __thiscall CDialogEx::~CDialogEx(void)" (??1CDialogEx##UAE#XZ)
1>test1Dlg.obj : error LNK2001: unresolved external symbol "protected: virtual __thiscall CDialogImpl::~CDialogImpl(void)" (??1CDialogImpl##MAE#XZ)
1>test1Dlg.obj : error LNK2001: unresolved external symbol "protected: static struct AFX_MSGMAP const * __stdcall CDialogEx::GetThisMessageMap(void)" (?GetThisMessageMap#CDialogEx##KGPBUAFX_MSGMAP##XZ)
1>test1Dlg.obj : error LNK2019: unresolved external symbol "public: __thiscall CDialogEx::CDialogEx(unsigned int,class CWnd *)" (??0CDialogEx##QAE#IPAVCWnd###Z) referenced in function "public: __thiscall CAboutDlg::CAboutDlg(void)" (??0CAboutDlg##QAE#XZ)
1>test1Dlg.obj : error LNK2001: unresolved external symbol "public: virtual struct CRuntimeClass * __thiscall CDialogEx::GetRuntimeClass(void)const " (?GetRuntimeClass#CDialogEx##UBEPAUCRuntimeClass##XZ)
1>test1Dlg.obj : error LNK2001: unresolved external symbol "public: virtual class CMenu * __thiscall CWnd::GetMenu(void)const " (?GetMenu#CWnd##UBEPAVCMenu##XZ)
1>test1Dlg.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CWnd::SetMenu(class CMenu *)" (?SetMenu#CWnd##UAEHPAVCMenu###Z)
1>test1Dlg.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CWnd::OnDrawIconicThumbnailOrLivePreview(class CDC &,class CRect,class CSize,int,int &)" (?OnDrawIconicThumbnailOrLivePreview#CWnd##UAEXAAVCDC##VCRect##VCSize##HAAH#Z)
1>test1Dlg.obj : error LNK2001: unresolved external symbol "protected: virtual int __thiscall CDialogEx::OnCommand(unsigned int,long)" (?OnCommand#CDialogEx##MAEHIJ#Z)
1>test1Dlg.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CDialogEx::PreTranslateMessage(struct tagMSG *)" (?PreTranslateMessage#CDialogEx##UAEHPAUtagMSG###Z)
1>test1Dlg.obj : error LNK2001: unresolved external symbol "protected: virtual int __thiscall CWnd::OnTouchInputs(unsigned int,struct tagTOUCHINPUT *)" (?OnTouchInputs#CWnd##MAEHIPAUtagTOUCHINPUT###Z)
1>test1Dlg.obj : error LNK2001: unresolved external symbol "protected: virtual int __thiscall CWnd::OnTouchInput(class CPoint,int,int,struct tagTOUCHINPUT *)" (?OnTouchInput#CWnd##MAEHVCPoint##HHPAUtagTOUCHINPUT###Z)
1>test1Dlg.obj : error LNK2001: unresolved external symbol "protected: virtual unsigned long __thiscall CWnd::GetGestureStatus(class CPoint)" (?GetGestureStatus#CWnd##MAEKVCPoint###Z)
1>test1Dlg.obj : error LNK2001: unresolved external symbol "protected: virtual int __thiscall CWnd::OnGestureZoom(class CPoint,long)" (?OnGestureZoom#CWnd##MAEHVCPoint##J#Z)
1>test1Dlg.obj : error LNK2001: unresolved external symbol "protected: virtual int __thiscall CWnd::OnGesturePan(class CPoint,class CPoint)" (?OnGesturePan#CWnd##MAEHVCPoint##0#Z)
1>test1Dlg.obj : error LNK2001: unresolved external symbol "protected: virtual int __thiscall CWnd::OnGestureRotate(class CPoint,double)" (?OnGestureRotate#CWnd##MAEHVCPoint##N#Z)
1>test1Dlg.obj : error LNK2001: unresolved external symbol "protected: virtual int __thiscall CWnd::OnGestureTwoFingerTap(class CPoint)" (?OnGestureTwoFingerTap#CWnd##MAEHVCPoint###Z)
1>test1Dlg.obj : error LNK2001: unresolved external symbol "protected: virtual int __thiscall CWnd::OnGesturePressAndTap(class CPoint,long)" (?OnGesturePressAndTap#CWnd##MAEHVCPoint##J#Z)
1>test1Dlg.obj : error LNK2019: unresolved external symbol "public: long __thiscall CWnd::SendMessageW(unsigned int,unsigned int,long)const " (?SendMessageW#CWnd##QBEJIIJ#Z) referenced in function "protected: void __thiscall Ctest1Dlg::OnPaint(void)" (?OnPaint#Ctest1Dlg##IAEXXZ)
1>c:\Projects\test1\Debug\test1.exe : fatal error LNK1120: 32 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I've tried reinstalling VS2010 and made sure I had C++ installed, but I still get the errors. I've tried making the Multiple document and Single document types, these both work. So it's only the Dialog based one that has errors.
Thanks,
John.
You have to link with MFC. Go to Project - > Project Property -> Configuration Properties -> In "Use of MFC" put "Use MFC in a Static Library"