News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

[patch] Fix compilation of nettool

Started by ceeac, May 26, 2018, 01:18:49 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ceeac

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.

TurfIt

IMHO the unnecessary calls to network_http_get should be removed rather than bloating up nettool.

Dwachs

should compile with r8466 again. Thanks for reporting
Parsley, sage, rosemary, and maggikraut.