News:

SimuTranslator
Make Simutrans speak your language.

Compile error for simutrans server csv.cc

Started by tuxianer1988, May 20, 2012, 09:51:44 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

tuxianer1988

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

Dwachs

There seems to be a

#include <stdlib.h>

missing in csv.cc.

Edit: this is already corrected in current trunk version.
Parsley, sage, rosemary, and maggikraut.

VS

...and I wondered why the line was 185 instead of 186 :D

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

tuxianer1988

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

Dwachs

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 ?
Parsley, sage, rosemary, and maggikraut.

tuxianer1988

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

kierongreen

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.

tuxianer1988

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!

Dwachs

Compiling is usually tested with graphics, so this error just was not found in time of the release.
Parsley, sage, rosemary, and maggikraut.