fallahn / tmxlite

lightweight C++14 parser for Tiled tmx files
Other
404 stars 69 forks source link

CAN SOMEONE JUST EXPLAIN HOW TO USE THIS #117

Closed LGenAgul closed 1 year ago

LGenAgul commented 1 year ago

Please someone just explain to me like you would to a 5 year old how to use this damn program because I can not set this up, I've been trying all week and couldn't find any tutorial on the internet that was not vague or confusing

fallahn commented 1 year ago

What's your dev environment? Windows? Linux? macOS? Which compiler / tool chain are you using, and are you using an IDE? There are a few ways to use the library, but it depends on how you are developing.

chocolateimage commented 1 year ago

i have the same problem, it says "undefined reference to tmx::Map::load....." and how do i get the tiles, with "tileson" i can get the tiles but tileson doesnt load the map correctly (says "Missing map data...")

fallahn commented 1 year ago

'undefined reference' means that you've either not linked the library (if you've build tmxlite as a library) or not included the source files in your project. How you do that depends on your compiler and IDE/Editor.

chocolateimage commented 1 year ago

but how do i link the library? if i add -ltmxlite it doesn't work

fallahn commented 1 year ago

Do you have it installed somewhere? Did you build it from source? It shouldn't be any different from linking any other library.

chocolateimage commented 1 year ago

i did sudo make install from here https://github.com/fallahn/tmxlite/wiki/Quick-Start but now (i added -ltmxlite) it says error while loading shared libraries: libtmxlite.so: cannot open shared object file: No such file or directory

fallahn commented 1 year ago

Ah OK. It will have installed to /usr/lib so make sure that's in your library path when linking. The header files will be in /usr/include

chocolateimage commented 1 year ago

Ah OK. It will have installed to /usr/lib so make sure that's in your library path when linking. The header files will be in /usr/include

it is not in /usr/lib

fallahn commented 1 year ago

Sorry, /usr/local/lib - you should have had something like this when you installed it:

Untitled-1