Update on the Build saga.

  1. I got Freeciv 2.3 to build using MinGW/MSys.
  2. I got CMake to create makefiles for Visual studio which would enter into the compile step
  3. I discovered the code makes use of non C99 ideas like empty structs which have undefined behavior, and technically are illegal under rules for C. GCC allows it.
  4. The 2.3 code uses Assembler to inititialize structures. It is not clear the rational for this, since it can easily be done in C.
  5. Someone fixed the assembler code in shared.c and shared.h, and so 2.4 looks cleaner. Examining the code, there has been a raft of changes, so writing code for the stable 2.3 release may not have as much transfer ability to the current tree.
  6. Attempting the CMakes for 2.4, It appears the current checkin source does not match the distributed 2.4 Beta. For example, the python code in common\ up on the svn branches tree for 2_4 does not match the distributed gz file. in the SVN tree client expects packhand_gen.h, but the py script in common generates packages_gen.h, and worse, the two files gen files appear to be radically different.
  7. Swell. Attempting to built vanilla distributed 2.4 beta gz file.

I will be happy when I am so over getting this puppy to compile for visual studio.

Steps to get a 2.4 tree to compile

  • copy cMakeLists to
common, client/luascript client, client/gtk 2... client agents... and so on
copy rc2c.sed script to gtk-gui2.0
find in files, all inline to INLINE (there is a forceinline in msvc, though it is suspicious the number of cases where the developer is saying they are smarter than the compiler.
client struct is declared with as empty- doesn't look like they are doing any fancy override or trying to do a C++ type thing, so just put in in dummy value to these- "int __DummyNoEmptyStructs"
add to Studio includes path: (View.Other Windows.Property Manager.Debug|Win32.Microsoft_cpp Compiler.Include Directories:
postpend to list: c:\MinGW\include;C:\MinGW\lib\gcc\mingw32\4.6.2\include

Then maybe I can get some real work done.

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.