Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Compile error when building Tilengine
#1
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
Reply
#2
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.
Reply
#3
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.
Reply
#4
Reply
#5
Did you got a message when you opened the project in Visual Studio for the first time?
Reply
#6
(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.
Reply
#7
When opening the Tilengine solution for the first time I got an message about retarget projects.

Please see the attached screenshot.


Attached Files Thumbnail(s)
   
Reply
#8
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.
Reply
#9
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.
Reply
#10
(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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)