The International Simutrans Forum

Simutrans Extended => Simutrans-Extended development => Topic started by: O01eg on December 22, 2016, 07:09:03 PM

Title: [devel-new-2] Couldn't build nettool.
Post by: O01eg on December 22, 2016, 07:09:03 PM
I get build error of undeclared function.

In file included from ../network/network_cmd_ingame.h:6:0,
                 from ../network/network_socket_list.cc:3:
../network/../simworld.h: In member function 'sint64 karte_t::get_seconds_to_ticks(uint32) const':
../network/../simworld.h:1477:72: error: 'seconds_to_ticks' was not declared in this scope
   return seconds_to_ticks(seconds, get_settings().get_meters_per_tile());


Rev: 617dd75fc13
Title: Re: [devel-new-2] Couldn't build nettool.
Post by: jamespetts on December 22, 2016, 08:36:31 PM
Thank you for the report. It is a little difficult for me to debug nettool at present because I am currently staying away from home and without access to my usual computer. May I ask whether you are building on Linux or Windows?
Title: Re: [devel-new-2] Couldn't build nettool.
Post by: O01eg on December 22, 2016, 11:04:50 PM
I build it on Linux.
Title: Re: [devel-new-2] Couldn't build nettool.
Post by: jamespetts on December 22, 2016, 11:38:05 PM
Thank you for clarifying that. I am not sure why you are having that problem, as the nightly build server works without difficulty.

Perhaps you could try downloading the binary from the nightly build server here (http://bridgewater-brunel.me.uk/downloads/nightly/linux-x64/nettool)?
Title: Re: [devel-new-2] Couldn't build nettool.
Post by: O01eg on December 23, 2016, 05:16:36 AM
I found why nettool cann't be compiled. In simunits.h function seconds_to_ticks defined in block #ifndef NETTOL but in commit 7cf526ab it was unconditionally used in simworld.h.
Title: Re: [devel-new-2] Couldn't build nettool.
Post by: jamespetts on December 23, 2016, 12:13:39 PM
Thank you, that is helpful. I will have to fix that when I get home in the new year.
Title: Re: [devel-new-2] Couldn't build nettool.
Post by: O01eg on December 23, 2016, 11:23:20 PM
I fixed it here: https://github.com/jamespetts/simutrans-experimental/pull/47
Title: Re: [devel-new-2] Couldn't build nettool.
Post by: jamespetts on December 23, 2016, 11:34:01 PM
Thank you very much indeed - I have applied the fix via Github.