The International Simutrans Forum

Community => Simutrans Help Center => Topic started by: tuxianer1988 on May 20, 2012, 09:51:44 AM

Title: Compile error for simutrans server csv.cc
Post by: tuxianer1988 on May 20, 2012, 09:51:44 AM
Hi guys,

I just tried to compile the latest stable release from simutrans. I downloaded the sources from sorceforge . Adapted the config.default und started compiling. After some time I was faced with this error:

===> CXX utils/csv.cc
utils/csv.cc: In member function »int CSV_t::encode(const char*, cbuffer_t&)«:
utils/csv.cc:185: Fehler: »free« wurde in diesem Gültigkeitsbereich nicht definiert
make: *** [build/default/utils/csv.o] Fehler 1

I already search for csv packages, but I did not find anything approprirate.

Thanks for your help in advance and looking forwards reading your suggestions.

Greetz

Tuxianer
Title: Re: Compile error for simutrans server csv.cc
Post by: Dwachs on May 20, 2012, 12:06:40 PM
There seems to be a

#include <stdlib.h>

missing in csv.cc.

Edit: this is already corrected in current trunk version.
Title: Re: Compile error for simutrans server csv.cc
Post by: VS on May 20, 2012, 12:10:41 PM
...and I wondered why the line was 185 instead of 186 :D
Title: Re: Compile error for simutrans server csv.cc
Post by: tuxianer1988 on May 20, 2012, 12:17:56 PM
Thanks, that resolved the issue, now I get the next error.

===> LD  build/default/sim
build/default/besch/reader/obj_reader.o: In function `obj_reader_t::load(char const*, char const*)':
obj_reader.cc:(.text+0xf46): undefined reference to `large_font_total_height'
build/default/boden/grund.o: In function `grund_t::display_overlay(short, short)':
grund.cc:(.text+0x1dd2): undefined reference to `large_font_total_height'
grund.cc:(.text+0x1e18): undefined reference to `large_font_total_height'
grund.cc:(.text+0x1e52): undefined reference to `large_font_total_height'
grund.cc:(.text+0x1ea2): undefined reference to `large_font_total_height'
build/default/gui/ai_option_t.o:ai_option_t.cc:(.text+0x2cd): more undefined references to `large_font_total_height' follow
build/default/simwin.o: In function `win_draw_window_title(koord, koord, unsigned short, char const*, unsigned short, koord3d, bool, bool, simwin_gadget_flags_t&)':
simwin.cc:(.text+0x2b23): undefined reference to `large_font_ascent'
simwin.cc:(.text+0x2b96): undefined reference to `large_font_ascent'
build/default/vehicle/simvehikel.o: In function `vehikel_t::display_after(int, int, bool) const':
simvehikel.cc:(.text+0x6ffa): undefined reference to `large_font_total_height'
collect2: ld gab 1 als Ende-Status zurück
make: *** [build/default/sim] Fehler 1

But to be honest this looks pretty severe :)

Greetz
Title: Re: Compile error for simutrans server csv.cc
Post by: Dwachs on May 20, 2012, 12:31:31 PM
You need to add

int large_font_total_height = 11;
int large_font_ascent = 9;

to simgraph0.cc.

You want to compile simutrans to be used as server with the last stable release ?
Title: Re: Compile error for simutrans server csv.cc
Post by: tuxianer1988 on May 20, 2012, 01:20:10 PM
Hi Dwachs,

exactly, at least this was my intention. But I am surprised that I have to modify the code in all these matters.

Greets
Title: Re: Compile error for simutrans server csv.cc
Post by: kierongreen on May 20, 2012, 02:31:32 PM
We don't as a community really have resources to maintain stable releases after release. While we do make every effort to ensure there are no bugs this cannot always be tested on all platforms and with all compiling flags.
Title: [SOLVED] Re: Compile error for simutrans server csv.cc
Post by: tuxianer1988 on May 20, 2012, 03:16:32 PM
Oh, sorry I most definitely misspelled myself. The question was, why are these two changes necessary, when the "stable" client of simutrans works like a charm. I was just wondering if I cannot build from scratch also the client should have had these problems.

This was no offence, it just a question out of curiosity. :)

Greetz and many thanks for the help!
Title: Re: Compile error for simutrans server csv.cc
Post by: Dwachs on May 20, 2012, 04:03:45 PM
Compiling is usually tested with graphics, so this error just was not found in time of the release.