Author Topic: Cannot compile makeobj [r7985]  (Read 794 times)

0 Members and 1 Guest are viewing this topic.

Offline Vladki

Cannot compile makeobj [r7985]
« on: December 23, 2016, 11:47:24 PM »
Hello, trying to compile makeobj r7985 gives this error:
(Linux 32-bit)
Code: [Select]
~/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

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4247
  • Total likes: 175
  • Helpful: 149
  • Languages: EN, DE, AT
Re: Cannot compile makeobj [r7985]
« Reply #1 on: December 26, 2016, 09:31:25 AM »
seems an include directive is missing:
Code: [Select]
#include <stdlib.h>
Parsley, sage, rosemary, and maggikraut.

Offline Vladki

Re: Cannot compile makeobj [r7985]
« Reply #2 on: December 26, 2016, 10:05:47 AM »
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

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4247
  • Total likes: 175
  • Helpful: 149
  • Languages: EN, DE, AT
Re: Cannot compile makeobj [r7985]
« Reply #3 on: December 28, 2016, 09:16:51 AM »
thanks for testing. I submitted your suggestions.
Parsley, sage, rosemary, and maggikraut.