Tilengine - The 2D retro graphics engine forum
Compile error when building Tilengine - 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: Compile error when building Tilengine (/showthread.php?tid=970)

Pages: 1 2


Compile error when building Tilengine - Motherbrain - 12-16-2020

Hi,

I just found out about Tilengine and it looks really promising.

However, when I try to build the Tilengine project (Windows 10, Visual Studio 2019, Win32, debug) I get a compile error:

1>C:\Tilengine\Tilengine-master\src\libpng\png.h(477,10): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory

I've followed the steps in README.md. It mentions only two dependencies: SDL and libpng. The libpng page that is referenced in README.md states: "If you download the Setup program of the package, any requirements for running applications, such as dynamic link libraries (DLL's) from the dependencies as listed below under Requirements, are already included." I used the setup to install libpng. I also downloaded and installed SDL2.

Is zlib a third dependency of Tilengine that I should download and install separately? Or did I somehow not install libpng correctly?

I know that I can buy the pre-build binaries, but I would like to know how to build Tilengine myself.

Thanks


RE: Compile error when building Tilengine - System64 - 12-16-2020

You should go here https://zlib.net/zlib1211.zip and put all .h files at the root of the zip in the libpng folder. It should work.

If it doesn't work, don't hesitate to tell what's happened here.


RE: Compile error when building Tilengine - megamarc - 12-16-2020

For a small donation you can download the required dependencies from itch.io, along prebuilt binaries:
https://megamarc.itch.io/tilengine

The base GitHub project doesn't hold dependencies or prebuilt binaries, just the source code.


RE: Compile error when building Tilengine - Motherbrain - 12-16-2020




RE: Compile error when building Tilengine - System64 - 12-16-2020

Did you got a message when you opened the project in Visual Studio for the first time?


RE: Compile error when building Tilengine - Motherbrain - 12-16-2020

(12-16-2020, 08:31 AM)megamarc Wrote: For a small donation you can download the required dependencies from itch.io, along prebuilt binaries:
https://megamarc.itch.io/tilengine

The base GitHub project doesn't hold dependencies or prebuilt binaries, just the source code.

Thanks megamarc. I'm aware that I can download the required depedencies for a small fee, but I would like to be able to build Tilengine myself. If I like it I'll probably make a donation anyway.

I followed the instructions in README.md, but those seem to be incomplete.


RE: Compile error when building Tilengine - Motherbrain - 12-16-2020

When opening the Tilengine solution for the first time I got an message about retarget projects.

Please see the attached screenshot.


RE: Compile error when building Tilengine - Motherbrain - 12-16-2020

These are all the steps I took:

After this I got the message about "Retarget Projects". I selected OK and when I tried to build the solution I got the linker errors as mentioned in my earlier post.


RE: Compile error when building Tilengine - megamarc - 12-17-2020

Hi,
Those errors are from libpng complaining about not finding zlib implementation. Putting zlib headers is one part of the solution, but there must be the actual library with zlib.lib or similar name. Sometimes libpng includes zlib bundled inside, others it doesn't, that depens on who is packaging libpng. In your case, seems that libpng you downloaded doesn't include it, so you must provide it externally.


RE: Compile error when building Tilengine - System64 - 12-17-2020

(12-16-2020, 10:51 PM)Motherbrain Wrote: When opening the Tilengine solution for the first time I got an message about retarget projects.

Please see the attached screenshot.

You have to download the right version of Visual Studio