The International Simutrans Forum

Simutrans Extended => Simutrans-Extended bug reports => Simutrans-Extended development => Simutrans-Extended closed bug reports => Topic started by: jamespetts on October 28, 2012, 01:05:16 PM

Title: Help sought with nettool compile issue
Post by: jamespetts on October 28, 2012, 01:05:16 PM
I am in the process of trying, eventually, to release the next version of Simutrans-Experimental (10.12), but I have hit upon a bizarre problem compiling Nettool - I am getting the following compile errors:


1>network.obj : error LNK2001: unresolved external symbol "public: class float32e8_t const __thiscall float32e8_t::operator/(class float32e8_t const &)const " (??Kfloat32e8_t@@QBE?BV0@ABV0@@Z)
1>network.obj : error LNK2001: unresolved external symbol "public: class float32e8_t const __thiscall float32e8_t::operator*(class float32e8_t const &)const " (??Dfloat32e8_t@@QBE?BV0@ABV0@@Z)
1>network.obj : error LNK2001: unresolved external symbol "public: void __thiscall float32e8_t::set_value(int)" (?set_value@float32e8_t@@QAEXH@Z)
1>network.obj : error LNK2001: unresolved external symbol "public: void __thiscall float32e8_t::set_value(unsigned int)" (?set_value@float32e8_t@@QAEXI@Z)
1>C:\Users\James\Documents\Development\Simutrans\simutrans-experimental-sources\\simutrans\Nettool-Experimental.exe : fatal error LNK1120: 4 unresolved externals


The float32e8_t is a special class for cross-platform network synchronised capable floating point values written by Bernd Gabriel for the physics calculations. I cannot find any references to it in the nettool files, which I think are more or less unchanged from the Standard versions. If there is no reference to any float32e_8_t object in any of the nettool .cc files, I cannot understand how the LNK2001 error is thrown in MSVC. Any thoughts on the topic would be much appreciated.
Title: Re: Help sought with nettool compile issue
Post by: jamespetts on November 11, 2012, 07:50:40 PM
Any thoughts, anyone...?
Title: Re: Help sought with nettool compile issue
Post by: Dwachs on November 11, 2012, 08:13:45 PM
network.cc includes network_cmd_ingame.h, which includes simworld.h, which includes simunits.h, which has float-arithmetic with constants, which the linker cannot resolve.

hope this helps.
Title: Re: Help sought with nettool compile issue
Post by: jamespetts on November 11, 2012, 08:43:00 PM
That does help - thatnk you very much! Now fixed.