Hello! I downloaded tinyxml (2.6.1), put it as prescribed in my project folder, registered it in the project file

#include "tinyxml/tinyxml.h" #include "tinyxml/tinystr.h" 

I refer from the function main () to the functions of the library. But when building a project, the linker swears:

 1>Client.obj : error LNK2019: ссылка Π½Π° Π½Π΅Ρ€Π°Π·Ρ€Π΅ΡˆΠ΅Π½Π½Ρ‹ΠΉ внСшний символ "public: virtual __thiscall TiXmlNode::~TiXmlNode(void)" (??1TiXmlNode@@UAE@XZ) Π² Ρ„ΡƒΠ½ΠΊΡ†ΠΈΠΈ "public: virtual __thiscall TiXmlDocument::~TiXmlDocument(void)" (??1TiXmlDocument@@UAE@XZ) 1>Client.obj : error LNK2019: ссылка Π½Π° Π½Π΅Ρ€Π°Π·Ρ€Π΅ΡˆΠ΅Π½Π½Ρ‹ΠΉ внСшний символ "public: class TiXmlElement const * __thiscall TiXmlNode::NextSiblingElement(char const *)const " (?NextSiblingElement@TiXmlNode@@QBEPBVTiXmlElement@@PBD@Z) Π² Ρ„ΡƒΠ½ΠΊΡ†ΠΈΠΈ "public: class TiXmlElement * __thiscall TiXmlNode::NextSiblingElement(char const *)" (?NextSiblingElement@TiXmlNode@@QAEPAVTiXmlElement@@PBD@Z) 1>Client.obj : error LNK2019: ссылка Π½Π° Π½Π΅Ρ€Π°Π·Ρ€Π΅ΡˆΠ΅Π½Π½Ρ‹ΠΉ внСшний символ "public: class TiXmlElement const * __thiscall TiXmlNode::FirstChildElement(char const *)const " (?FirstChildElement@TiXmlNode@@QBEPBVTiXmlElement@@PBD@Z) Π² Ρ„ΡƒΠ½ΠΊΡ†ΠΈΠΈ "public: class TiXmlElement * __thiscall TiXmlNode::FirstChildElement(char const *)" (?FirstChildElement@TiXmlNode@@QAEPAVTiXmlElement@@PBD@Z) 1>Client.obj : error LNK2019: ссылка Π½Π° Π½Π΅Ρ€Π°Π·Ρ€Π΅ΡˆΠ΅Π½Π½Ρ‹ΠΉ внСшний символ "public: char const * __thiscall TiXmlElement::GetText(void)const " (?GetText@TiXmlElement@@QBEPBDXZ) Π² Ρ„ΡƒΠ½ΠΊΡ†ΠΈΠΈ "void __cdecl init(class Agentpp::Mib &)" (?init@@YAXAAVMib@Agentpp@@@Z) 1>Client.obj : error LNK2019: ссылка Π½Π° Π½Π΅Ρ€Π°Π·Ρ€Π΅ΡˆΠ΅Π½Π½Ρ‹ΠΉ внСшний символ "public: __thiscall TiXmlDocument::TiXmlDocument(void)" (??0TiXmlDocument@@QAE@XZ) Π² Ρ„ΡƒΠ½ΠΊΡ†ΠΈΠΈ "void __cdecl init(class Agentpp::Mib &)" (?init@@YAXAAVMib@Agentpp@@@Z) 1>Client.obj : error LNK2019: ссылка Π½Π° Π½Π΅Ρ€Π°Π·Ρ€Π΅ΡˆΠ΅Π½Π½Ρ‹ΠΉ внСшний символ "public: bool __thiscall TiXmlDocument::LoadFile(char const *,enum TiXmlEncoding)" (?LoadFile@TiXmlDocument@@QAE_NPBDW4TiXmlEncoding@@@Z) Π² Ρ„ΡƒΠ½ΠΊΡ†ΠΈΠΈ "void __cdecl init(class Agentpp::Mib &)" (?init@@YAXAAVMib@Agentpp@@@Z) 1>Client.obj : error LNK2001: Π½Π΅Ρ€Π°Π·Ρ€Π΅ΡˆΠ΅Π½Π½Ρ‹ΠΉ внСшний символ ""public: virtual char const * __thiscall TiXmlDocument::Parse(char const *,class TiXmlParsingData *,enum TiXmlEncoding)" (?Parse@TiXmlDocument@@UAEPBDPBDPAVTiXmlParsingData@@W4TiXmlEncoding@@@Z)" 1>Client.obj : error LNK2001: Π½Π΅Ρ€Π°Π·Ρ€Π΅ΡˆΠ΅Π½Π½Ρ‹ΠΉ внСшний символ ""public: virtual void __thiscall TiXmlDocument::Print(struct _iobuf *,int)const " (?Print@TiXmlDocument@@UBEXPAU_iobuf@@H@Z)" 1>Client.obj : error LNK2001: Π½Π΅Ρ€Π°Π·Ρ€Π΅ΡˆΠ΅Π½Π½Ρ‹ΠΉ внСшний символ ""public: virtual bool __thiscall TiXmlDocument::Accept(class TiXmlVisitor *)const " (?Accept@TiXmlDocument@@UBE_NPAVTiXmlVisitor@@@Z)" 1>Client.obj : error LNK2001: Π½Π΅Ρ€Π°Π·Ρ€Π΅ΡˆΠ΅Π½Π½Ρ‹ΠΉ внСшний символ ""protected: virtual class TiXmlNode * __thiscall TiXmlDocument::Clone(void)const " (?Clone@TiXmlDocument@@MBEPAVTiXmlNode@@XZ)" 1>Client.obj : error LNK2001: Π½Π΅Ρ€Π°Π·Ρ€Π΅ΡˆΠ΅Π½Π½Ρ‹ΠΉ внСшний символ ""private: static struct TiXmlString::Rep TiXmlString::nullrep_" (?nullrep_@TiXmlString@@0URep@1@A)" 

In the code I checked - all these functions are declared and reserved, the compiler sees them.

  • And the linker sees the library file? - Harry
  • Here's how to make the linker see this header file? In general, no lib for this tinyxml is supposed ... I have MS Visual Studio 2015 Professional. - AVM
  • You confuse compiler with linker. - nick_n_a
  • Do you have a dll? Do you have a lib? There are two ways to connect the finished code with the dll 1. Lib-file (prescribe or in the linker option or pragma) It’s easier to download lib in nete and register in the project. 2. Def-file where you prescribe the alias relation ?? 0TiXmlDocument @@ QAE @ XZ to the function in the dll (in principle, lib is approximately equal to def). This method works, but more difficult, is used as an extreme case. - nick_n_a
  • If the aliases inside the library are the same as yours written (?? 0TiXmlDocument @@ QAE @ XZ, you can see them, let's say, with the exescope utility), then the lib file can be created with the implib utility. - nick_n_a

0