News:

Do you need help?
Simutrans Wiki Manual can help you to play and extend Simutrans. In 9 languages.

Cannot compile makeobj [r7985]

Started by Vladki, December 23, 2016, 11:47:24 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Vladki

Hello, trying to compile makeobj r7985 gives this error:
(Linux 32-bit)

~/simutrans.dev/simutrans/trunk$ make makeobj
make -e -C makeobj FLAGS=""
make[1]: Entering directory `/home/tono/simutrans.dev/simutrans/trunk/makeobj'
===> CXX ../besch/writer/crossing_writer.cc
g++ -DMAKEOBJ -O -DNDEBUG -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align    -c -MMD -o ../build/default/besch/writer/crossing_writer-makeobj.o ../besch/writer/crossing_writer.cc
../besch/writer/crossing_writer.cc: In member function 'virtual void crossing_writer_t::write_obj(FILE*, obj_node_t&, tabfileobj_t&)':
../besch/writer/crossing_writer.cc:50:36: error: 'atoi' was not declared in this scope
../besch/writer/crossing_writer.cc:80:9: error: 'exit' was not declared in this scope
../besch/writer/crossing_writer.cc:89:9: error: 'exit' was not declared in this scope
../besch/writer/crossing_writer.cc:95:9: error: 'exit' was not declared in this scope
../besch/writer/crossing_writer.cc:142:9: error: 'exit' was not declared in this scope
make[1]: *** [../build/default/besch/writer/crossing_writer-makeobj.o] Error 1
make[1]: Leaving directory `/home/tono/simutrans.dev/simutrans/trunk/makeobj'
make: *** [makeobj] Error 2

Dwachs

seems an include directive is missing:

#include <stdlib.h>
Parsley, sage, rosemary, and maggikraut.

Vladki

Thanks for the hint.

I had to add #include <stdlib.h> to the following files:

besch/writer/crossing_writer.cc
besch/writer/get_waytype.cc
besch/writer/vehicle_writer.cc

Dwachs

thanks for testing. I submitted your suggestions.
Parsley, sage, rosemary, and maggikraut.