The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: ceeac on May 26, 2018, 01:18:49 PM

Title: [patch] Fix compilation of nettool
Post by: ceeac on May 26, 2018, 01:18:49 PM
Hi!

When compiling nettool r8461, the following error message is emitted:


===> LD  ../build/default/nettool/nettool
../build/default/utils/log-nettool.o: In function `log_t::log_t(char const*, bool, bool, bool, char const*, char const*)':
log.cc:(.text+0x392): undefined reference to `dr_fopen(char const*, char const*)'
../build/default/network/network-nettool.o: In function `get_external_IP(cbuffer_t&)':
network.cc:(.text+0xc0c): undefined reference to `cbuffer_t::clear()'
network.cc:(.text+0xc22): undefined reference to `network_http_get(char const*, char const*, cbuffer_t&)'
../build/default/network/network-nettool.o: In function `prepare_for_server(char*, int)':
network.cc:(.text+0xc4e): undefined reference to `cbuffer_t::cbuffer_t()'
network.cc:(.text+0xc64): undefined reference to `network_http_get(char const*, char const*, cbuffer_t&)'
network.cc:(.text+0xc76): undefined reference to `cbuffer_t::~cbuffer_t()'
network.cc:(.text+0xc97): undefined reference to `cbuffer_t::get_str() const'
network.cc:(.text+0xcb4): undefined reference to `cbuffer_t::~cbuffer_t()'
collect2: error: ld returned 1 exit status
../uncommon.mk:22: recipe for target '../build/default/nettool/nettool' failed
make: *** [../build/default/nettool/nettool] Error 1


This patch fixes the linker error.
Title: Re: [patch] Fix compilation of nettool
Post by: TurfIt on May 27, 2018, 02:06:19 AM
IMHO the unnecessary calls to network_http_get should be removed rather than bloating up nettool.
Title: Re: [patch] Fix compilation of nettool
Post by: Dwachs on May 27, 2018, 02:18:46 PM
should compile with r8466 again. Thanks for reporting