News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

Problems with gzgetc_

Started by yorkeiser, March 28, 2012, 12:27:07 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

yorkeiser

Hi,
first of all, I didn't find a place for technical help, so I hope this is the right place; on the contrary, please admins move this thread.

Following the development of the Map Viewer, I downloaded sources and tried to debug them, just to understand game data structures and where minimap is drawn.
With some difficulties due to static/dinamic linking and multithread model, I finally managed compiling a standard version and beginning to debug it, but I still have a major problem on this macro:

#define gzgetc(g) ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : gzgetc_(g))

that is defined in zlib.h header and is called in loadsave.cc. Compiler claims an undefined reference for gzgetc_, and effectively in zlibstat.lib I only see definition for gzgetc function. Did any developer have this problem and/or knows how to solve this?

Other question: I downloaded sources from https://github.com/aburch/simutrans/, but tarball says version 110.0.1, while official releases are at version 111.2. Is this normal?


Markohs

1) Better download it from: SVN: svn://tron.homeunix.org/simutrans/simutrans/ (username anon, no password)
2) About the zlib, if you are using Windows and Visual C++, I had to:

a) Go to http://www.winimage.com/zLibDll/index.html
b) Download zlib125dll.zip  and zlib125.zip.
c) Point include path in the compiler to the "include" directory in the zlib125.zip extracted.
d) Link against the .lib in "static32" subdir in the other file.
e) Add "ZLIB_WINAPI" to the preprocessor definitions.

That worked for me.