Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: sfml-tmxloader for Tiled Map Editor?  (Read 4458 times)

0 Members and 1 Guest are viewing this topic.

SuckyNoob

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
sfml-tmxloader for Tiled Map Editor?
« on: May 14, 2017, 11:03:04 pm »
Has anyone used it?

I downloaded the Library and can get it into my codebase to at least load a map file. Sort of. I get no error warnings until I try and build and then it throws all these errors talking about "8 unresolved externals"

It looks like they are unresolved externals pertaining to the sfml-tmxloader-master library.

I am confused.

This is the library.
https://github.com/fallahn/sfml-tmxloader

and this is a template for VS that uses it and SFML
https://github.com/MossFrog/Tile_Map

The template version doesn't throw any "unresolved externals"
Yet it has no more code (that needs to be used by the tmxloader lib) than my own project.....

Anyone have an idea of what's going on? Or can possibly point to a tutorial on how to use tmxloader or how to make a json map loader in C++ for SFML with the Tiled json/tmx exported files?
« Last Edit: May 14, 2017, 11:10:39 pm by SuckyNoob »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: sfml-tmxloader for Tiled Map Editor?
« Reply #1 on: May 15, 2017, 01:38:38 am »
"unresolved externals" aren't just useless texts, but they actually tell you what the issue is, so you should never exclude them when asking for help. It's basically like asking about an error and never mentioning the actual error. ;)

Make sure to checkout the tutorial.

And there's also tmxlite if you want something lighter.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

SuckyNoob

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
Re: sfml-tmxloader for Tiled Map Editor?
« Reply #2 on: May 15, 2017, 08:41:05 pm »
Ya I would have posted the error logs. The thing is I don't even know if I set it up right in the first place. That tutorial is a bit confusing. It says at the top that it now supports creating shared libs and static libs. So should I ignore what comes after about zlib and is that out of date?

I used Cmake and could create the static libs. But I want the dlls. So far I could only create the pugi-d.dll and pugi.dll. It wont output tmxloader.dll(s).

If anyone reads this if they can give an exact runthrough/process of what I am supposed to do to get the libs/.dlls from Cmake so I can include them in my project that would be sweet.

At first I just tried to include the "include" directory like I did with the SFML library. But that gives me "unresolved externals". Now those are a different story. I understand what unresolved externals are. But can't find which externals those are, the debugger wont send me to the file the error gets thrown from when I double click the message.

I'll try again and when those error messages for unresolved externals pop back up I'll post them in here.

(I'd prefer to use the sfml-tmxloader instead of tmxlite, because it comes with an awesome quadtree! among other things) But I even tried tmxlite and I also can't get that to work. Nor the STP tmx loader

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: sfml-tmxloader for Tiled Map Editor?
« Reply #3 on: May 16, 2017, 11:36:37 am »
I'm not sure how the CMake script is built, but you usually just have to check CMAKE_SHARED_LIBS and you'll end up with DLLs.

Not sure if you still need to link against zlib in your project when building a shared library, but you certainly need it to build the library in the first place.

Unresolved symbols are linker errors so they don't occur in one file, but it simply means that the implementation of the given function or class couldn't be found anywhere, which generally means you dilink the library that has those symbols.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything