The International Simutrans Forum

 

Author Topic: Compiling makeobj from Experimental sources  (Read 1711 times)

0 Members and 1 Guest are viewing this topic.

Offline Carl

  • Devotee
  • *
  • Posts: 1614
    • Website
  • Languages: EN
Compiling makeobj from Experimental sources
« on: February 06, 2012, 12:25:26 PM »
I've been trying, without success, to compile makeobj from the -devel branch in MSVC Express 2010.

Two questions:

1. Which project should be compiled -- the makeobj.vcxproj in the root directory or one of the projects in the /makeobj/ directory?

2. Attempting to compile either of these runs into a fatal error in a call to a file -- 'tpl\debug_helper.cc' -- which doesn't appear to be present.

Any advice gratefully received!

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18763
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Compiling makeobj from Experimental sources
« Reply #1 on: February 07, 2012, 12:03:02 AM »
Hmm - can you see if you can find the Makeobj.sln file in the Github repository? That's the place to start, I think.

Offline Carl

  • Devotee
  • *
  • Posts: 1614
    • Website
  • Languages: EN
Re: Compiling makeobj from Experimental sources
« Reply #2 on: February 07, 2012, 08:50:08 AM »
Attempting to compile /makeobj/makeobj.sln gives the following errors:
Code: [Select]
1>building_writer.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)[/size]
1>building_writer.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>building_writer.obj : error LNK2001: unresolved external symbol "public: void __thiscall float32e8_t::set_value(int)" (?set_value@float32e8_t@@QAEXH@Z)
1>building_writer.obj : error LNK2001: unresolved external symbol "public: void __thiscall float32e8_t::set_value(unsigned int)" (?set_value@float32e8_t@@QAEXI@Z)
1>image_writer.obj : error LNK2001: unresolved external symbol "public: static unsigned int const * const bild_besch_t::rgbtab" (?rgbtab@bild_besch_t@@2QBIB)
1>vehicle_writer.obj : error LNK2001: unresolved external symbol "public: void __thiscall imagelist3d_writer_t::write_obj(struct _iobuf *,class obj_node_t &,class slist_tpl<class slist_tpl<class slist_tpl<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > const &)" (?write_obj@imagelist3d_writer_t@@QAEXPAU_iobuf@@AAVobj_node_t@@ABV?$slist_tpl@V?$slist_tpl@V?$slist_tpl@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@@@@@@@Z)

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18763
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Compiling makeobj from Experimental sources
« Reply #3 on: February 08, 2012, 12:23:23 AM »
It looks as though the file imagelist_3d_writer.cc has not been added to the project (I'm not sure why your version should be different to mine). Try adding that and see whether it compiles then.

Offline Carl

  • Devotee
  • *
  • Posts: 1614
    • Website
  • Languages: EN
Re: Compiling makeobj from Experimental sources
« Reply #4 on: September 13, 2012, 03:17:50 PM »
I'm still having some trouble getting this to compile.

First, when I try to open /makeobj/makeobj.sln in VC++2010 Express, it complains that it cannot open the solution since it cannot find makeobj-experimental.vcxproj. There is indeed no such file, so I first edit the sln file to refer instead to makeobj-experimental.vcproj, which does exist.

After going through the conversion process, compiling fails due to references to two absent files: \utils\ctstring_t.cc and \tpl\debug_helper.cc. I delete both of these files from the project.

Upon attempting to compile again, I receive a large number of errors. At this point I apply the advice given above: adding imagelist_3d_writer.cc and imagelist_3d_writer.h to the project. I also added imagelist_3d_reader.cc and imagelist_3d_reader.h for good measure.

After this I attempt to compile again, and am left with the following few errors:

Code: [Select]
1>building_writer.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>building_writer.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>building_writer.obj : error LNK2001: unresolved external symbol "public: void __thiscall float32e8_t::set_value(int)" (?set_value@float32e8_t@@QAEXH@Z)
1>building_writer.obj : error LNK2001: unresolved external symbol "public: void __thiscall float32e8_t::set_value(unsigned int)" (?set_value@float32e8_t@@QAEXI@Z)
1>image_writer.obj : error LNK2001: unresolved external symbol "public: static unsigned int const * const bild_besch_t::rgbtab" (?rgbtab@bild_besch_t@@2QBIB)

These seem to be similar to those I quoted back in February.

Any ideas for what I should try next?

--------------------

Edit:
The image_writer error disappears by adding bild_besch.cc and .h to the project.

The building_writer errors disappear by adding float32e8_t.cc and .h to the project.

The project now compiles! :D
« Last Edit: September 13, 2012, 04:03:26 PM by carlbaker »

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18763
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Compiling makeobj from Experimental sources
« Reply #5 on: September 13, 2012, 10:14:30 PM »
Glad that you've got this working!