News:

Do you need help?
Simutrans Wiki Manual can help you to play and extend Simutrans. In 9 languages.

Error compiling nettool

Started by Ashley, August 21, 2011, 11:53:53 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ashley

timothy@debian:~/simex/simutrans-experimental/nettools$ make
===> CXX ../dataobj/freelist.cc
===> CXX ../dataobj/network_address.cc
===> CXX ../dataobj/network_cmd.cc
===> CXX ../dataobj/network_packet.cc
===> CXX ../dataobj/network_socket_list.cc
===> CXX ../simdebug.cc
===> CXX ../simmem.cc
===> CXX ../utils/memory_rw.cc
===> CXX ../utils/simstring.cc
===> CXX ../utils/fetchopt.cc
===> CXX ../utils/log.cc
===> CXX ../dataobj/network.cc
../dataobj/network.cc: In function 'SOCKET network_open_address(const char*, long int, const char*&)':
../dataobj/network.cc:242: warning: comparison between signed and unsigned integer expressions
===> CXX ../dataobj/network_file_transfer.cc
===> CXX nettool.cc
===> LD  ../build/default/nettool/nettool
../build/default/dataobj/network_socket_list-nettool.o: In function `socket_list_t::reset_clients()':
network_socket_list.cc:(.text+0x509): undefined reference to `nwc_routesearch_t::reset()'
../build/default/dataobj/network_socket_list-nettool.o: In function `socket_list_t::reset()':
network_socket_list.cc:(.text+0x56c): undefined reference to `nwc_routesearch_t::reset()'
../build/default/dataobj/network_socket_list-nettool.o: In function `socket_list_t::remove_client(int)':
network_socket_list.cc:(.text+0x721): undefined reference to `nwc_routesearch_t::remove_client_entry(unsigned int)'
collect2: ld returned 1 exit status
make: *** [../build/default/nettool/nettool] Error 1


This is with release 9.12 cloned from github. Guessing a problem with the Makefile...
Use Firefox? Interested in IPv6? Try SixOrNot the IPv6 status indicator for Firefox.
Why not try playing Simutrans online? See the Game Servers board for details.

jamespetts

Timothy,

ahh, this is probably because path_explorer.cc is not included in the makefile; but where is the makefile for Nettool...?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Ashley

It's under the nettool/ subdirectory. Add path_explorer.cc to SHARED_SOURCES helps a little, but then:

===> LD  ../build/default/nettool/nettool
../build/default/dataobj/network_socket_list-nettool.o: In function `socket_list_t::reset_clients()':
network_socket_list.cc:(.text+0x509): undefined reference to `nwc_routesearch_t::reset()'
../build/default/dataobj/network_socket_list-nettool.o: In function `socket_list_t::reset()':
network_socket_list.cc:(.text+0x56c): undefined reference to `nwc_routesearch_t::reset()'
../build/default/dataobj/network_socket_list-nettool.o: In function `socket_list_t::remove_client(int)':
network_socket_list.cc:(.text+0x721): undefined reference to `nwc_routesearch_t::remove_client_entry(unsigned int)'
../build/default/path_explorer-nettool.o: In function `path_explorer_t::compartment_t::reset_connexion_entry(unsigned short)':
path_explorer.cc:(.text+0x328): undefined reference to `haltestelle_t::connexion::operator delete(void*)'
../build/default/path_explorer-nettool.o: In function `path_explorer_t::compartment_t::set_category(unsigned char)':
path_explorer.cc:(.text+0x4ed): undefined reference to `warenbauer_t::get_info_catg_index(unsigned char)'
path_explorer.cc:(.text+0x504): undefined reference to `ware_besch_t::get_catg_name() const'
../build/default/path_explorer-nettool.o: In function `path_explorer_t::compartment_t::enumerate_all_paths(path_explorer_t::compartment_t::path_element_t const* const*, quickstone_tpl<haltestelle_t> const*, unsigned short const*, unsigned short)':
path_explorer.cc:(.text+0x562): undefined reference to `haltestelle_t::get_name() const'
path_explorer.cc:(.text+0x5b4): undefined reference to `haltestelle_t::get_name() const'
path_explorer.cc:(.text+0x60a): undefined reference to `haltestelle_t::get_name() const'
../build/default/path_explorer-nettool.o: In function `path_explorer_t::initialise(karte_t*)':
path_explorer.cc:(.text+0x678): undefined reference to `warenbauer_t::max_catg_index'
path_explorer.cc:(.text+0x683): undefined reference to `warenbauer_t::nichts'
../build/default/path_explorer-nettool.o: In function `path_explorer_t::compartment_t::step()':
path_explorer.cc:(.text+0xeee): undefined reference to `dr_time()'
path_explorer.cc:(.text+0xeff): undefined reference to `haltestelle_t::alle_haltestellen'
path_explorer.cc:(.text+0xf0d): undefined reference to `haltestelle_t::alle_haltestellen'
path_explorer.cc:(.text+0x1360): undefined reference to `warenbauer_t::get_info_catg_index(unsigned char)'
path_explorer.cc:(.text+0x13cf): undefined reference to `dr_time()'
path_explorer.cc:(.text+0x15c4): undefined reference to `haltestelle_t::get_halt(karte_t*, koord3d, spieler_t const*)'
path_explorer.cc:(.text+0x1881): undefined reference to `schedule_t::increment_index(unsigned char*, bool*) const'
path_explorer.cc:(.text+0x19aa): undefined reference to `haltestelle_t::get_basis_pos() const'
path_explorer.cc:(.text+0x1a05): undefined reference to `haltestelle_t::get_basis_pos() const'
path_explorer.cc:(.text+0x1e2a): undefined reference to `haltestelle_t::connexion::operator new(unsigned int)'
path_explorer.cc:(.text+0x1e9f): undefined reference to `haltestelle_t::get_average_waiting_time(quickstone_tpl<haltestelle_t>, unsigned char) const'
path_explorer.cc:(.text+0x2084): undefined reference to `haltestelle_t::connexion::operator delete(void*)'
path_explorer.cc:(.text+0x217a): undefined reference to `haltestelle_t::connexion::operator delete(void*)'
path_explorer.cc:(.text+0x21ff): undefined reference to `dr_time()'
path_explorer.cc:(.text+0x2259): undefined reference to `umgebung_t::networkmode'
path_explorer.cc:(.text+0x23c0): undefined reference to `dr_time()'
path_explorer.cc:(.text+0x24d0): undefined reference to `dr_time()'
path_explorer.cc:(.text+0x2528): undefined reference to `umgebung_t::networkmode'
path_explorer.cc:(.text+0x26b3): undefined reference to `dr_time()'
path_explorer.cc:(.text+0x2722): undefined reference to `haltestelle_t::get_connexions(unsigned char)'
path_explorer.cc:(.text+0x2897): undefined reference to `dr_time()'
path_explorer.cc:(.text+0x28ef): undefined reference to `umgebung_t::networkmode'
path_explorer.cc:(.text+0x2a14): undefined reference to `dr_time()'
path_explorer.cc:(.text+0x3436): undefined reference to `dr_time()'
path_explorer.cc:(.text+0x34c5): undefined reference to `umgebung_t::networkmode'
path_explorer.cc:(.text+0x36c0): undefined reference to `dr_time()'
path_explorer.cc:(.text+0x36f4): undefined reference to `haltestelle_t::reroute_goods(unsigned char)'
path_explorer.cc:(.text+0x3724): undefined reference to `dr_time()'
path_explorer.cc:(.text+0x377d): undefined reference to `umgebung_t::networkmode'
../build/default/path_explorer-nettool.o: In function `path_explorer_t::full_instant_refresh()':
path_explorer.cc:(.text+0x397b): undefined reference to `translator::translate(char const*)'
path_explorer.cc:(.text+0x3983): undefined reference to `display_set_progress_text(char const*)'
path_explorer.cc:(.text+0x3999): undefined reference to `display_progress(int, int)'
path_explorer.cc:(.text+0x3a0c): undefined reference to `display_progress(int, int)'
collect2: ld returned 1 exit status
make: *** [../build/default/nettool/nettool] Error 1
Use Firefox? Interested in IPv6? Try SixOrNot the IPv6 status indicator for Firefox.
Why not try playing Simutrans online? See the Game Servers board for details.

jamespetts

Hmm - do you have nwc_command_ingame.cc set to compile? I'm not too familiar with the architecture of the net tool and what files are included, but it looks as though Experimental needs more files from Simutrans itself to be included.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Dwachs

Deleting the #include "pathexplorer.h" in network_cmd.h should help a lot. This seems to be a left over from before the split in network_Cmd and networ_cmd_ingame.

This split was done to avoid compiling most of the simutrans engine (#included by header files due to inlining) into nettool.
Parsley, sage, rosemary, and maggikraut.

jamespetts

Dwachs,

thank you very much for that. I have made some amendments to the code to this effect (path_explorer.h had to be included in network_cmd_ingame.h); Timothy, can you re-test?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

jamespetts

I have managed to produce a version of Nettool that compiles, which is now on the 10.x branch. Additionally, a downloadable binary for Windows is available here. I have not yet tested it, so I am not sure if the changes that I made for it to compile break anything; I should be grateful if people could test.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

jamespetts

I have tested and can confirm that this works.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.