Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
yet another "can't install" problem
#1
I'm sorry to be bothering y'all with something so dumb some more, but my inability to actually use it is driving me crazy, as while I created my own custom project to mess around with it, I stumbled across the problem of visual studio not being able to find the definitions of things like TLN_Init() and such. so in hopes that installing it properly is a simple problem with a simple solution, I'm going to post a list of what I've done, to hopefully help someone else point out I missed something bloody obvious.

1) download the windows 64-bit from itch.io
2) drag it to some misc folder
3) open console, type "install"
4) realise Windows doesn't let you run .bat files naturally because it finds them untrustworthy so use "\.install.bat" as the console recommends.
5) claims:
"Installing AMD64
lib\x64\Tilengine.dll
        1 file(s) copied." 

which sounds good I guess.
6) create visual studio project (as c++ console type)
7) move the include directory to project
8) move the contents of lib/x64 (but not the directories themselves) to the project folder
9) going into visual studio, opening the project properties
9a) going to C/C++ "general" type "include" to Additional Include Directories
9b) going to linker "general", type "include" to Additional Library Directories
10) going into project, including TileEngine.h, as recommended by the VS autocomplete system
11) in the main function, just adding (via Copy+Paste from TileEngine's demo code on it's main website) "TLN_Init(400, 200, 1, 0, 0);"
12) run, results in LNK 2019 error 
(Error LNK2019 unresolved external symbol __imp__TLN_Init referenced in function _main [projectname] C:\Users\[raziel]\Documents\GameRetrodev\[projectname]\[projectname].obj 1)

13) annoy people on the forums about how you can't make it work. (again, really sorry for wasting your guys' time on something that's probably real obvious)
Reply
#2
Hi,
In your project/linker properties -> additional libraries, you must add Tilengine.lib to the list.
In Windows, a .dll file is the one required at runtime to run the program, but for building a program that uses it, you also need its companion .lib to be included in the build process.
Let me know any other issue you may have!
Reply
#3
(02-04-2022, 04:38 PM)megamarc Wrote: Hi,
In your project/linker properties -> additional libraries, you must add Tilengine.lib to the list.
In Windows, a .dll file is the one required at runtime to run the program, but for building a program that uses it, you also need its companion .lib to be included in the build process.
Let me know any other issue you may have!

Ah! thank you so much, I had a little problem with it complaining about missing SDL2.dll, but after I added that, it all works now. Thanks so much for your help!
Reply
#4
Thumbs Up 
Welcome! Glad to know you have it already working.
Happy coding!
Reply
#5
Hey I'm sorry to be bothering you again, but after getting a screen to finally show up, I decided to add a temporary tilemap to the screen, just to have something render, which ran into a fascinating problem which I do not comprehend, which is as follows:

"Exception thrown at 0x00007FFE6113DB87 (Tilengine.dll) in TEAeon.exe: 0xC0000005: Access violation reading location 0x0000000000000000."

this error occurs, according to VS at this code block in my main() function

TLN_Init(400, 240, 4, 256, 0);
TLN_CreateWindow(NULL, 0);

TLN_Tilemap background = TLN_LoadTilemap("untitled.tmx", NULL); // crashes here
TLN_SetLayerTilemap(0, background);

which I find odd, as I've triple checked that it's the right filename, and even moved it from a subdirectory into the main one, owing to the fact that I was worried it wouldn't be able to access the subdirectory, but it still gave the same error nonetheless.

I included a link to a google drive containing the zipped version, 'cause the filesize is too big for the normal attachment system, apparently, so if you can't access it for whatever reason, please let me know.

https://drive.google.com/drive/folders/1...sp=sharing
Reply
#6
Hi!
Tilengine is not compatible with Tiled's "infinite maps" and its "chunk" properties, I wrote the parser long before this feature was introduced. This causes the unhandled exception you're experienced -that I should fix of course-  Cool 

For the time being, just uncheck "infinite map" and save it, it should work.
By the way, "untitled.tsx" tileset is missing in your zip, make sure it's available in your working copy.

Let me know!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)