The International Simutrans Forum

 

Author Topic: [patch] Fix compilation of nettool  (Read 348 times)

0 Members and 1 Guest are viewing this topic.

Offline ceeac

  • *
  • Posts: 32
[patch] Fix compilation of nettool
« on: May 26, 2018, 01:18:49 PM »
Hi!

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

Code: [Select]
===> 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.

Offline TurfIt

  • Dev Team, Coder/patcher
  • Devotee
  • *
  • Posts: 1323
Re: [patch] Fix compilation of nettool
« Reply #1 on: May 27, 2018, 02:06:19 AM »
IMHO the unnecessary calls to network_http_get should be removed rather than bloating up nettool.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4564
  • Languages: EN, DE, AT
Re: [patch] Fix compilation of nettool
« Reply #2 on: May 27, 2018, 02:18:46 PM »
should compile with r8466 again. Thanks for reporting