SFML community forums

Help => General => Topic started by: aanthonyz on January 09, 2015, 10:07:45 pm

Title: "Tiled" Loader Problems
Post by: aanthonyz on January 09, 2015, 10:07:45 pm
Im currently trying to get the loader to work but im having some issues.

Error   1       error LNK2019: unresolved external symbol "public: __thiscall pugi::xml_attribute::operator void (__cdecl*)(class pugi::xml_attribute * * *)(void)const " (??Bxml_attribute@pugi@@QBEP6AXPAPAPAV01@@ZXZ) referenced in function "private: bool __thiscall tmx::MapLoader::m_ParseImageLayer(class pugi::xml_node const &)" (?m_ParseImageLayer@MapLoader@tmx@@AAE_NABVxml_node@pugi@@@Z)        C:\Users\aanthonyz\OneDrive\Programming\SFML Applications\TMX\TMX\MapLoaderPrivate.obj  TMX

Error   2       error LNK2019: unresolved external symbol "public: bool __thiscall pugi::xml_attribute::operator!(void)const " (??7xml_attribute@pugi@@QBE_NXZ) referenced in function "private: bool __thiscall tmx::MapLoader::m_ParseImageLayer(class pugi::xml_node const &)" (?m_ParseImageLayer@MapLoader@tmx@@AAE_NABVxml_node@pugi@@@Z) C:\Users\aanthonyz\OneDrive\Programming\SFML Applications\TMX\TMX\MapLoaderPrivate.obj  TMX

Error   3       error LNK2019: unresolved external symbol "public: char const * __thiscall pugi::xml_attribute::as_string(char const *)const " (?as_string@xml_attribute@pugi@@QBEPBDPBD@Z) referenced in function "private: bool __thiscall tmx::MapLoader::m_ParseImageLayer(class pugi::xml_node const &)" (?m_ParseImageLayer@MapLoader@tmx@@AAE_NABVxml_node@pugi@@@Z)     C:\Users\aanthonyz\OneDrive\Programming\SFML Applications\TMX\TMX\MapLoaderPrivate.obj  TMX

Error   4       error LNK2019: unresolved external symbol "public: int __thiscall pugi::xml_attribute::as_int(int)const " (?as_int@xml_attribute@pugi@@QBEHH@Z) referenced in function "private: bool __thiscall tmx::MapLoader::m_ParseMapNode(class pugi::xml_node const &)" (?m_ParseMapNode@MapLoader@tmx@@AAE_NABVxml_node@pugi@@@Z)       C:\Users\aanthonyz\OneDrive\Programming\SFML Applications\TMX\TMX\MapLoaderPrivate.obj  TMX

Error   5       error LNK2019: unresolved external symbol "public: unsigned int __thiscall pugi::xml_attribute::as_uint(unsigned int)const " (?as_uint@xml_attribute@pugi@@QBEII@Z) referenced in function "private: bool __thiscall tmx::MapLoader::m_ParseLayer(class pugi::xml_node const &)" (?m_ParseLayer@MapLoader@tmx@@AAE_NABVxml_node@pugi@@@Z)       C:\Users\aanthonyz\OneDrive\Programming\SFML Applications\TMX\TMX\MapLoaderPrivate.obj  TMX

Error   6       error LNK2019: unresolved external symbol "public: float __thiscall pugi::xml_attribute::as_float(float)const " (?as_float@xml_attribute@pugi@@QBEMM@Z) referenced in function "private: bool __thiscall tmx::MapLoader::m_ParseImageLayer(class pugi::xml_node const &)" (?m_ParseImageLayer@MapLoader@tmx@@AAE_NABVxml_node@pugi@@@Z) C:\Users\aanthonyz\OneDrive\Programming\SFML Applications\TMX\TMX\MapLoaderPrivate.obj  TMX

Error   7       error LNK2019: unresolved external symbol "public: bool __thiscall pugi::xml_attribute::as_bool(bool)const " (?as_bool@xml_attribute@pugi@@QBE_N_N@Z) referenced in function "private: bool __thiscall tmx::MapLoader::m_ParseLayer(class pugi::xml_node const &)" (?m_ParseLayer@MapLoader@tmx@@AAE_NABVxml_node@pugi@@@Z)     C:\Users\aanthonyz\OneDrive\Programming\SFML Applications\TMX\TMX\MapLoaderPrivate.obj  TMX

Error   8       error LNK2019: unresolved external symbol "public: __thiscall pugi::xml_node::xml_node(void)" (??0xml_node@pugi@@QAE@XZ) referenced in function "private: bool __thiscall tmx::MapLoader::m_ParseImageLayer(class pugi::xml_node const &)" (?m_ParseImageLayer@MapLoader@tmx@@AAE_NABVxml_node@pugi@@@Z)        C:\Users\aanthonyz\OneDrive\Programming\SFML Applications\TMX\TMX\MapLoaderPrivate.obj  TMX

Error   9       error LNK2019: unresolved external symbol "public: __thiscall pugi::xml_node::operator void (__cdecl*)(class pugi::xml_node * * *)(void)const " (??Bxml_node@pugi@@QBEP6AXPAPAPAV01@@ZXZ) referenced in function "private: bool __thiscall tmx::MapLoader::m_ParseImageLayer(class pugi::xml_node const &)" (?m_ParseImageLayer@MapLoader@tmx@@AAE_NABVxml_node@pugi@@@Z)       C:\Users\aanthonyz\OneDrive\Programming\SFML Applications\TMX\TMX\MapLoaderPrivate.obj  TMX

Error   10      error LNK2001: unresolved external symbol "public: __thiscall pugi::xml_node::operator void (__cdecl*)(class pugi::xml_node * * *)(void)const " (??Bxml_node@pugi@@QBEP6AXPAPAPAV01@@ZXZ)       C:\Users\aanthonyz\OneDrive\Programming\SFML Applications\TMX\TMX\MapLoaderPublic.obj   TMX

Error   11      error LNK2019: unresolved external symbol "public: bool __thiscall pugi::xml_node::operator!(void)const " (??7xml_node@pugi@@QBE_NXZ) referenced in function "private: bool __thiscall tmx::MapLoader::m_ParseImageLayer(class pugi::xml_node const &)" (?m_ParseImageLayer@MapLoader@tmx@@AAE_NABVxml_node@pugi@@@Z)   C:\Users\aanthonyz\OneDrive\Programming\SFML Applications\TMX\TMX\MapLoaderPrivate.obj  TMX

Error   12      error LNK2001: unresolved external symbol "public: bool __thiscall pugi::xml_node::operator!(void)const " (??7xml_node@pugi@@QBE_NXZ)   C:\Users\aanthonyz\OneDrive\Programming\SFML Applications\TMX\TMX\MapLoaderPublic.obj   TMX

Error   13      error LNK2019: unresolved external symbol "public: class pugi::xml_node __thiscall pugi::xml_node::first_child(void)const " (?first_child@xml_node@pugi@@QBE?AV12@XZ) referenced in function "private: bool __thiscall tmx::MapLoader::m_ParseObjectgroup(class pugi::xml_node const &)" (?m_ParseObjectgroup@MapLoader@tmx@@AAE_NABVxml_node@pugi@@@Z) C:\Users\aanthonyz\OneDrive\Programming\SFML Applications\TMX\TMX\MapLoaderPrivate.obj  TMX

Error   14      error LNK2001: unresolved external symbol "public: class pugi::xml_node __thiscall pugi::xml_node::first_child(void)const " (?first_child@xml_node@pugi@@QBE?AV12@XZ)   C:\Users\aanthonyz\OneDrive\Programming\SFML Applications\TMX\TMX\MapLoaderPublic.obj   TMX

Error   15      error LNK2019: unresolved external symbol "public: class pugi::xml_text __thiscall pugi::xml_node::text(void)const " (?text@xml_node@pugi@@QBE?AVxml_text@2@XZ) referenced in function "private: bool __thiscall tmx::MapLoader::m_ParseLayer(class pugi::xml_node const &)" (?m_ParseLayer@MapLoader@tmx@@AAE_NABVxml_node@pugi@@@Z)   C:\Users\aanthonyz\OneDrive\Programming\SFML Applications\TMX\TMX\MapLoaderPrivate.obj  TMX

Error   16      error LNK2019: unresolved external symbol "public: class pugi::xml_node __thiscall pugi::xml_node::child(char const *)const " (?child@xml_node@pugi@@QBE?AV12@PBD@Z) referenced in function "private: bool __thiscall tmx::MapLoader::m_ParseImageLayer(class pugi::xml_node const &)" (?m_ParseImageLayer@MapLoader@tmx@@AAE_NABVxml_node@pugi@@@Z)    C:\Users\aanthonyz\OneDrive\Programming\SFML Applications\TMX\TMX\MapLoaderPrivate.obj  TMX

Error   17      error LNK2001: unresolved external symbol "public: class pugi::xml_node __thiscall pugi::xml_node::child(char const *)const " (?child@xml_node@pugi@@QBE?AV12@PBD@Z)    C:\Users\aanthonyz\OneDrive\Programming\SFML Applications\TMX\TMX\MapLoaderPublic.obj   TMX

Error   18      error LNK2019: unresolved external symbol "public: class pugi::xml_attribute __thiscall pugi::xml_node::attribute(char const *)const " (?attribute@xml_node@pugi@@QBE?AVxml_attribute@2@PBD@Z) referenced in function "private: bool __thiscall tmx::MapLoader::m_ParseImageLayer(class pugi::xml_node const &)" (?m_ParseImageLayer@MapLoader@tmx@@AAE_NABVxml_node@pugi@@@Z)  C:\Users\aanthonyz\OneDrive\Programming\SFML Applications\TMX\TMX\MapLoaderPrivate.obj  TMX

Error   19      error LNK2019: unresolved external symbol "public: class pugi::xml_node __thiscall pugi::xml_node::next_sibling(char const *)const " (?next_sibling@xml_node@pugi@@QBE?AV12@PBD@Z) referenced in function "private: bool __thiscall tmx::MapLoader::m_ParseLayer(class pugi::xml_node const &)" (?m_ParseLayer@MapLoader@tmx@@AAE_NABVxml_node@pugi@@@Z)        C:\Users\aanthonyz\OneDrive\Programming\SFML Applications\TMX\TMX\MapLoaderPrivate.obj  TMX

Error   20      error LNK2019: unresolved external symbol "public: char const * __thiscall pugi::xml_text::as_string(char const *)const " (?as_string@xml_text@pugi@@QBEPBDPBD@Z) referenced in function "private: bool __thiscall tmx::MapLoader::m_ParseLayer(class pugi::xml_node const &)" (?m_ParseLayer@MapLoader@tmx@@AAE_NABVxml_node@pugi@@@Z) C:\Users\aanthonyz\OneDrive\Programming\SFML Applications\TMX\TMX\MapLoaderPrivate.obj  TMX

Error   21      error LNK2019: unresolved external symbol "public: __thiscall pugi::xml_parse_result::xml_parse_result(void)" (??0xml_parse_result@pugi@@QAE@XZ) referenced in function "private: bool __thiscall tmx::MapLoader::m_ParseTileSets(class pugi::xml_node const &)" (?m_ParseTileSets@MapLoader@tmx@@AAE_NABVxml_node@pugi@@@Z)    C:\Users\aanthonyz\OneDrive\Programming\SFML Applications\TMX\TMX\MapLoaderPrivate.obj  TMX

Error   22      error LNK2019: unresolved external symbol "public: __thiscall pugi::xml_parse_result::operator bool(void)const " (??Bxml_parse_result@pugi@@QBE_NXZ) referenced in function "private: bool __thiscall tmx::MapLoader::m_ParseTileSets(class pugi::xml_node const &)" (?m_ParseTileSets@MapLoader@tmx@@AAE_NABVxml_node@pugi@@@Z)        C:\Users\aanthonyz\OneDrive\Programming\SFML Applications\TMX\TMX\MapLoaderPrivate.obj  TMX

Error   23      error LNK2001: unresolved external symbol "public: __thiscall pugi::xml_parse_result::operator bool(void)const " (??Bxml_parse_result@pugi@@QBE_NXZ)    C:\Users\aanthonyz\OneDrive\Programming\SFML Applications\TMX\TMX\MapLoaderPublic.obj   TMX

Error   24      error LNK2019: unresolved external symbol "public: char const * __thiscall pugi::xml_parse_result::description(void)const " (?description@xml_parse_result@pugi@@QBEPBDXZ) referenced in function "private: bool __thiscall tmx::MapLoader::m_ParseTileSets(class pugi::xml_node const &)" (?m_ParseTileSets@MapLoader@tmx@@AAE_NABVxml_node@pugi@@@Z)  C:\Users\aanthonyz\OneDrive\Programming\SFML Applications\TMX\TMX\MapLoaderPrivate.obj  TMX

Error   25      error LNK2001: unresolved external symbol "public: char const * __thiscall pugi::xml_parse_result::description(void)const " (?description@xml_parse_result@pugi@@QBEPBDXZ)      C:\Users\aanthonyz\OneDrive\Programming\SFML Applications\TMX\TMX\MapLoaderPublic.obj   TMX

Error   26      error LNK2019: unresolved external symbol "public: __thiscall pugi::xml_document::xml_document(void)" (??0xml_document@pugi@@QAE@XZ) referenced in function "private: bool __thiscall tmx::MapLoader::m_ParseTileSets(class pugi::xml_node const &)" (?m_ParseTileSets@MapLoader@tmx@@AAE_NABVxml_node@pugi@@@Z)        C:\Users\aanthonyz\OneDrive\Programming\SFML Applications\TMX\TMX\MapLoaderPrivate.obj  TMX

Error   27      error LNK2001: unresolved external symbol "public: __thiscall pugi::xml_document::xml_document(void)" (??0xml_document@pugi@@QAE@XZ)    C:\Users\aanthonyz\OneDrive\Programming\SFML Applications\TMX\TMX\MapLoaderPublic.obj   TMX

Error   28      error LNK2019: unresolved external symbol "public: __thiscall pugi::xml_document::~xml_document(void)" (??1xml_document@pugi@@QAE@XZ) referenced in function "private: bool __thiscall tmx::MapLoader::m_ParseTileSets(class pugi::xml_node const &)" (?m_ParseTileSets@MapLoader@tmx@@AAE_NABVxml_node@pugi@@@Z)       C:\Users\aanthonyz\OneDrive\Programming\SFML Applications\TMX\TMX\MapLoaderPrivate.obj  TMX

Error   29      error LNK2001: unresolved external symbol "public: __thiscall pugi::xml_document::~xml_document(void)" (??1xml_document@pugi@@QAE@XZ)   C:\Users\aanthonyz\OneDrive\Programming\SFML Applications\TMX\TMX\MapLoaderPublic.obj   TMX

Error   30      error LNK2019: unresolved external symbol "public: struct pugi::xml_parse_result __thiscall pugi::xml_document::load_file(char const *,unsigned int,enum pugi::xml_encoding)" (?load_file@xml_document@pugi@@QAE?AUxml_parse_result@2@PBDIW4xml_encoding@2@@Z) referenced in function "private: bool __thiscall tmx::MapLoader::m_ParseTileSets(class pugi::xml_node const &)" (?m_ParseTileSets@MapLoader@tmx@@AAE_NABVxml_node@pugi@@@Z)      C:\Users\aanthonyz\OneDrive\Programming\SFML Applications\TMX\TMX\MapLoaderPrivate.obj  TMX

Error   31      error LNK2001: unresolved external symbol "public: struct pugi::xml_parse_result __thiscall pugi::xml_document::load_file(char const *,unsigned int,enum pugi::xml_encoding)" (?load_file@xml_document@pugi@@QAE?AUxml_parse_result@2@PBDIW4xml_encoding@2@@Z)  C:\Users\aanthonyz\OneDrive\Programming\SFML Applications\TMX\TMX\MapLoaderPublic.obj   TMX

Error   32      error LNK2019: unresolved external symbol "public: char const * __thiscall pugi::xml_node::name(void)const " (?name@xml_node@pugi@@QBEPBDXZ) referenced in function "public: bool __thiscall tmx::MapLoader::Load(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?Load@MapLoader@tmx@@QAE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)      C:\Users\aanthonyz\OneDrive\Programming\SFML Applications\TMX\TMX\MapLoaderPublic.obj   TMX

Error   33      error LNK2019: unresolved external symbol "public: class pugi::xml_node __thiscall pugi::xml_node::next_sibling(void)const " (?next_sibling@xml_node@pugi@@QBE?AV12@XZ) referenced in function "public: bool __thiscall tmx::MapLoader::Load(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?Load@MapLoader@tmx@@QAE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)   C:\Users\aanthonyz\OneDrive\Programming\SFML Applications\TMX\TMX\MapLoaderPublic.obj   TMX

Error   34      error LNK1120: 24 unresolved externals  C:\Users\aanthonyz\OneDrive\Programming\SFML Applications\TMX\Debug\TMX.exe     TMX

 

Any help?[/code]
Title: Re: "Tiled" Loader Problems
Post by: eXpl0it3r on January 09, 2015, 10:46:54 pm
I've moved your thread since the SFML Projects sub-forum is for projects and not questions about the project. ;)

You're missing about all and any kind of information.
Are you using the code from GitHub? How are you using the loader? When building what does this error occur? What exact OS are you using? Which version of Visual Studio are you using? etc. etc.
Title: Re: "Tiled" Loader Problems
Post by: aanthonyz on January 09, 2015, 11:02:01 pm
Sorry didnt know what else to post.

Visual Studio 2012 Express
Windows 8
I got the code from https://github.com/fallahn/sfml-tmxloader, currently using the latest version
Using current version of zlib 1.2.8

Usage:
#include "tmx\MapLoader.h"

int main()
{
        tmx::MapLoader ml("testmap\\intromap");
        ml.Load("test.tmx");
        return 0;
}

Im trying to think of other steps but nothing comes to mind.
Title: Re: "Tiled" Loader Problems
Post by: Jesper Juhl on January 10, 2015, 12:15:30 am
#include "tmx\MapLoader.h"
...
        tmx::MapLoader ml("testmap\\intromap");
...
 
Don't use backslashes ('\')in paths. Just use frontslashes ('/') since they  A) work on all platforms (yes, even Windows) and  B) You don't need to escape them with an extra backslash. Just get into the habit now and then be happy when you need to port your code to a different platform in the future.

Anyway. You are having linker problems about unresolved symbols.
That usually means that you forgot to link a library that you use or linked the libraries in the wrong order.
The library in question seem to be PugiXML, so make sure you are linking that to your project.
Title: Re: "Tiled" Loader Problems
Post by: eXpl0it3r on January 10, 2015, 12:19:54 am
The PugiXML.cpp is essentially part of the repository and should be built/linked/etc. properly IF you build the loader correctly.
So what did you do to get that linker error? Did you use CMake to generate a project file? Did you just add all the files to your project?
Title: Re: "Tiled" Loader Problems
Post by: aanthonyz on January 10, 2015, 12:47:13 am
I just added the PugiXML.cpp file to the project and now it works totally fine. Thank you.