The International Simutrans Forum

 

Author Topic: Cannot compile with latest makeobj, old libpng  (Read 650 times)

0 Members and 1 Guest are viewing this topic.

Offline Rollmaterial fi

  • Devotee
  • *
  • Posts: 557
  • Languages: EN, FR, DE, FI, SE
Cannot compile with latest makeobj, old libpng
« 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?

Offline Vladki cz

  • Devotee
  • *
  • Posts: 2547
    • My addons, mostly roadsigns
  • Languages: EN, CS
Re: Cannot compile with latest makeobj, old libpng
« Reply #1 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.




Offline Rollmaterial fi

  • Devotee
  • *
  • Posts: 557
  • Languages: EN, FR, DE, FI, SE
Re: Cannot compile with latest makeobj, old libpng
« Reply #2 on: November 30, 2017, 06:56:30 PM »
That's precisely what I did.

This is the error I get:
Code: [Select]
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.
« Last Edit: November 30, 2017, 07:13:34 PM by Rollmaterial »

Offline Vladki cz

  • Devotee
  • *
  • Posts: 2547
    • My addons, mostly roadsigns
  • Languages: EN, CS
Re: Cannot compile with latest makeobj, old libpng
« Reply #3 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




Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18410
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Cannot compile with latest makeobj, old libpng
« Reply #4 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.

Offline Rollmaterial fi

  • Devotee
  • *
  • Posts: 557
  • Languages: EN, FR, DE, FI, SE
Re: Cannot compile with latest makeobj, old libpng
« Reply #5 on: November 30, 2017, 11:50:58 PM »
That circumvented the problem for me, thank you very much!

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18410
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Cannot compile with latest makeobj, old libpng
« Reply #6 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.