Tilengine - The 2D retro graphics engine forum
I'm unable to get the samples to work. - Printable Version

+- Tilengine - The 2D retro graphics engine forum (http://tilengine.org/forum)
+-- Forum: English forums (http://tilengine.org/forum/forumdisplay.php?fid=3)
+--- Forum: Support (http://tilengine.org/forum/forumdisplay.php?fid=7)
+--- Thread: I'm unable to get the samples to work. (/showthread.php?tid=918)



I'm unable to get the samples to work. - TheEmeraldFalcon - 10-31-2020

I'm on Windows, I downloaded the x64 version off of itch.io. I've got mingw, that works fine. However, upon compiling it told me it couldn't find the .lib file. I fixed this by renaming the x64 folder, inside the lib folder, to Win32. That fixed that error, but now, when I try to run any of the samples, it tells me:

collect2.exe: error: ld returned 1 exit status
Makefile:42: recipe for target 'barrel' failed
mingw32-make: *** [barrel] Error 1

I'm using the barrel sample for this, but the same happens with the other examples.


I should also add that with the mode7 example, before it gave me that error message, it's giving me tileset errors. I think these errors might be being caused by the examples being out-of-date, but I'm not sure.


RE: I'm unable to get the samples to work. - megamarc - 10-31-2020

Hi,
It looks like a tool/architecture mismatch. mingw32 you're using doesn't support x64 architecture, only x86. There's mingw64, but I can't give support on this tool because I don't use it.

You can either use Visual Studio Community -it's free-, or the excellent tiny C compiler (https://bellard.org/tcc). This is the tool I use for building the tests, it does support both x86 and x64 architectures, and doesn't require the .lib file as it links directly to the .dll.

Here you can see the script I use to build all the x64 tests with this compiler:

https://github.com/megamarc/Tilengine/blob/master/samples/build.bat

Let me know


RE: I'm unable to get the samples to work. - TheEmeraldFalcon - 10-31-2020

(10-31-2020, 05:02 AM)megamarc Wrote: Hi,
It looks like a tool/architecture mismatch. mingw32 you're using doesn't support x64 architecture, only x86. There's mingw64, but I can't give support on this tool because I don't use it.

You can either use Visual Studio Community -it's free-, or the excellent tiny C compiler (https://bellard.org/tcc). This is the tool I use for building the tests, it does support both x86 and x64 architectures, and doesn't require the .lib file as it links directly to the .dll.

Here you can see the script I use to build all the x64 tests with this compiler:

https://github.com/megamarc/Tilengine/blob/master/samples/build.bat

Let me know

I will, thank you


RE: I'm unable to get the samples to work. - TheEmeraldFalcon - 10-31-2020

I've gone ahead and gotten tcc to work, but when I try to run test.c, it'll open a blank window, even though I have the sonic example written in test.c.


RE: I'm unable to get the samples to work. - megamarc - 11-01-2020

Please post here what do you type and what output you get, to determine what's going on. You cannot run test.c, you must first build it (compile + link), what you run is the resulting test.exe