Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Tilengine

2D retro grapics engine with true raster effects for creating 8/16 bit style games · By megamarc

Sample Application Not Running

A topic by Kr3m created Mar 18, 2021 Views: 365 Replies: 5
Viewing posts 1 to 4
(2 edits)

So my sample application compiles just fine, but when I go to run it, it complains that it can't find Tilengine.dll  So, I paste this file into the same folder as the executable, and I get this:

Also, I'm getting this when trying to compile using x64 instead of Win32:


Developer(+1)

Hi,

This error is due to mixing 32 and 64 binaries. Make sure that Tilengine.dll and SDL2.dll you put in the same folder than the executable file match the CPU architecture.

gcc in windows can only generate 32-bit binaries, that's why you get the linker errors when trying to link to 64-bit version. There's something called mingw64 that can work 64-bit binaries, but for my daily tasks I use Tiny C Compiler that supports both architectures, has small footprint and mostly a drop-in replacement for gcc:

https://bellard.org/tcc/

Here you can see a screenshoot building test sample:

  • tcc builds correctly for both 32-bit and 64-bit bit
  • gcc builds correctly for 32-bit but fails for 64-bit


I was actually using gcc from my mingw64 install, but perhaps that isn't right.  I'll try tcc and see how that works out for me.  Not sure if this is a mistake or not, but SDL2.dll is not in the lib folder for the 64 bit version.  I know I'm not mixing binaries though as I have two separate installs for the 32 and 64 bit versions.

Okay so I get this error the first time I run the 64 bit application which may have to do with my antivirus since it runs fine the second time, but all I get is a blank screen rather than having the TMX asset display.

The 32 bit app also compiles fine, but won't run at all as shown here:


Developer

Hi,

32-bit version won't run due to architecture mismatch. Make sure everything in its path is 32-bit.

Without having your project (source code + assets) I can't guess why it's showing a blank screen. Please attach a download link to your project so I can take a look. You can register for free to the forums, there you can attach files and benefit from the Tilengine community:

http://www.tilengine.org/forum/

Regards,

Cool thanks.  I'm just running the code listed in README.MD on the Github page.  I posted on the forum here:  http://tilengine.org/forum/showthread.php?tid=1071