Build openttd and zlib.h+png.h

Got a problem with OpenTTD? Find some help here.

Moderator: OpenTTD Developers

Post Reply
User avatar
peste1
Engineer
Engineer
Posts: 47
Joined: 07 Aug 2003 10:13
Location: Monza (Milan), Italy
Contact:

Build openttd and zlib.h+png.h

Post by peste1 »

The compiler ask for zlib.h and png.h files... how can I obtain it?

Last CVS version.
Stefano
TTDX Configurator Translator
fabca2
Transport Coordinator
Transport Coordinator
Posts: 312
Joined: 14 Apr 2004 15:18
Location: Fr

Post by fabca2 »

on SF, take the "useful" package...

SF : http://sourceforge.net/projects/openttd/
User avatar
peste1
Engineer
Engineer
Posts: 47
Joined: 07 Aug 2003 10:13
Location: Monza (Milan), Italy
Contact:

Post by peste1 »

Thanks... but... the same error:

c:\TTDSorgente\saveload.c(816): fatal error C1083: Cannot open the "zlib.h" file: No such file or directory

And the same for png.h.
Stefano
TTDX Configurator Translator
fabca2
Transport Coordinator
Transport Coordinator
Posts: 312
Joined: 14 Apr 2004 15:18
Location: Fr

Post by fabca2 »

I don't know the tools you use to compile it.
you need to copy the .h file into an include folder, or (what I do) change the setting of your project to add the folder where those file stands as "other include directory" in VC6.
Bjarni
Tycoon
Tycoon
Posts: 2088
Joined: 08 Mar 2004 13:10

Post by Bjarni »

you need to have zlib and libpng installed, since libpng needs zlib, you only have to think about libpng. how to install them depens on what OS you are using
Steve2k4
Engineer
Engineer
Posts: 12
Joined: 10 May 2004 21:18

libpng.lib

Post by Steve2k4 »

Having some problems getting this to compile on MS Visual Studio 2003, this is the error I got:

Code: Select all

ttd fatal error LNK1104: cannot open file '.\libpng.lib'
This was after I installed the useful tools headers into \Vc7\include. I installed the libpng.lib into MSVC2003\Vc7\lib\. I have tried both versions (one from useful tools and the other which has a link a few posts up).

Am I putting the lib in the wrong place or is there an installation method I'm unaware of?

Thanx for your time,
Steve2k4
Steve2k4
Engineer
Engineer
Posts: 12
Joined: 10 May 2004 21:18

Post by Steve2k4 »

I figured it out. Stupid me. I put the libs in the wrong place, they needed to be in the main directory of the code. Thanx for letting me solve my own problem, lol :oops:
Post Reply

Return to “OpenTTD Problems”

Who is online

Users browsing this forum: No registered users and 16 guests