The International Simutrans Forum


Author Topic: about the function "gzFile" from libz / zlib update.  (Read 2995 times)

0 Members and 1 Guest are viewing this topic.


  • Guest
about the function "gzFile" from libz / zlib update.
« on: March 19, 2012, 12:25:54 PM »
I try to git the codes for GIT server and compile it. But I failed with the message below.

Code: [Select]
===> CXX dataobj/
dataobj/ In member function ‘bool loadsave_t::rd_open(const char*)’:
dataobj/ error: cannot convert ‘FILE* {aka _IO_FILE*}’ to ‘gzFile’ for argument ‘1’ to ‘char* gzgets(gzFile, char*, int)’
dataobj/ In member function ‘const char* loadsave_t::close()’:
dataobj/ In member function ‘bool loadsave_t::is_eof()’:
dataobj/ In member function ‘int loadsave_t::lsgetc()’:
dataobj/ error: ‘FILE’ has no member named ‘have’

My computer is Archlinux x86_64, and I tried to google the problem and get the nearly message below from from another pack.
Code: [Select]

its due to zlib-1.2.6....

There is a change in zlib.h

-   typedef voidp gzFile;       /* opaque gzip file descriptor */
+ typedef struct gzFile_s *gzFile;    /* semi-opaque gzip file descriptor */

since gzFile is changed from void * to gzFile_s *, implicit casting from FILE * to gzFile_s * will not work

Now I am not sure whether it will lead a bug to the executable binaries with zlib-1.2.6 installed. I will test it later.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4586
  • Languages: EN, DE, AT
Re: about the function "gzFile" from libz / zlib update.
« Reply #1 on: March 19, 2012, 04:07:05 PM »
this was fixed in simutrans standard some time ago, but obviously not merged into the branch you are compiling.