News:

Simutrans Chat Room
Where cool people of Simutrans can meet up.

Compiling makeobj from Experimental sources

Started by Carl, February 06, 2012, 12:25:26 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Carl

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!

jamespetts

Hmm - can you see if you can find the Makeobj.sln file in the Github repository? That's the place to start, I think.
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.

Carl

Attempting to compile /makeobj/makeobj.sln gives the following errors:
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)

jamespetts

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.
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.

Carl

#4
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:

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

jamespetts

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.