The International Simutrans Forum

Simutrans Extended => Simutrans-Extended development => Topic started by: Rollmaterial on November 30, 2017, 06:23:50 PM

Title: Cannot compile with latest makeobj, old libpng
Post by: Rollmaterial on November 30, 2017, 06:23:50 PM
I am trying to compile the pakset but the makeobj I compiled from the latest sources tells me it is built with libpng 1.2.52 but running with 1.6.18. Does this have to do with the sources or my own installation?
Title: Re: Cannot compile with latest makeobj, old libpng
Post by: Vladki on November 30, 2017, 06:55:45 PM
I think there is a compiled makeobj lurking in pak128.britan-ex sources. Take care to replace it with your compiled version.

Sent from my ONEPLUS A3003 using Tapatalk

Title: Re: Cannot compile with latest makeobj, old libpng
Post by: Rollmaterial on November 30, 2017, 06:56:30 PM
That's precisely what I did.

This is the error I get:
libpng warning: Application built with libpng-1.2.52 but running with 1.6.18
ERROR: while loading PNG:       Could not create read struct in ./ways/./images/hot-rolled-asphalt-road-heavy.png.
Title: Re: Cannot compile with latest makeobj, old libpng
Post by: Vladki on November 30, 2017, 08:31:12 PM
Then probably you have more libpng versions installed, or different version for binaries and different fir headers

Sent from my ONEPLUS A3003 using Tapatalk

Title: Re: Cannot compile with latest makeobj, old libpng
Post by: jamespetts on November 30, 2017, 09:13:09 PM
My apologies: I forgot to add the new compiled Windows version of makeobj-extended to the downloads folder on the Bridgewater-Brunel server, which I have now done. If you wanted a Linux version, there are nightly builds available on the nightly builds section of the server.
Title: Re: Cannot compile with latest makeobj, old libpng
Post by: Rollmaterial on November 30, 2017, 11:50:58 PM
That circumvented the problem for me, thank you very much!
Title: Re: Cannot compile with latest makeobj, old libpng
Post by: jamespetts on March 16, 2019, 09:48:58 PM
I encountered this problem myself recently: this was caused by the libpng.lib version being different to the png.h version. In my case, the png.h version was wrong as I had Visual Studio set up to point to the wrong directory with an out of date png.h version.

I have included this for reference in case anyone else comes upon this problem in the future.