The International Simutrans Forum

 

Author Topic: How to compile Simutrans Extended with Visual Studio 2015  (Read 11741 times)

0 Members and 1 Guest are viewing this topic.

Offline Spenk009

  • *
  • Posts: 182
How to compile Simutrans Extended with Visual Studio 2015
« on: December 29, 2014, 08:03:25 PM »
This is a guide from my recent experience with compiling Simutrans Extended. This is a snapshot of Dec 2017 on Windows 7 and your configuration may differ.

1. Install Microsoft Visual Studio 2015 (officially: here or any other place you like). Install and let it update. In the mean time you can proceed with the next steps.
2. Get the sources from GitHub: here. You can download the whole folder as a zip file on the right side of the page or sign up and fork your own branch. Extract the folder somewhere memorable (like "D:\Programming").
3. Get bzip2 from here. If you are only building the .exe, choose the appropriate dev version (x86=32bit, x64=64bit). Open this zip and extract the files into your extracted Extended folder under: "...\simutrans-experimental\utils\openttd\lib"
4. If you are also building the game folder you'll need the libbz2.dll, which is in the dll download, keep this extracted dll handy. You'll also need "pthreadVCE2.dll" from here. Select the latest/highest "prebuilt-dll-..-..-..-release", in the folder "dll", in the appropriate x86/x64 folder, you will find "pthreadVCE2.dll". Download this dll too and keep it with "libbz2.dll".
5. Start Visual Studio and open Simutrans-Extended.sln. Now click on Project -> Simutrans-Extended Properties... -> Configuration Properties -> VC++ Directories. Click on "Include Directories" once and then on the right of the field you'll see some paths listed. Next to that is a down arrow. Click that and click on <Edit...> in the resulting dropdown. On the top left of the window appearing you can add folders to the list. Add  "...\simutrans-experimental\utils\openttd" to this list. Things should be looking like this.
6. Below "Include Directories" you will find "Library Directories". Proceed as in the previous step and add "...\simutrans-experimental\utils\openttd\lib" to the list.
7. Try building the executable. The build should compile.

8. Move the Created Simutrans.exe into a fresh folder.
9. Add the .dll files from step 4 to the folder.
10. Add a pakset into the folder such as a nightly build.
11. Run your own compiled Simutrans!

Note: If you get an error with loadsave_t::start_tag(), delete or rename your Simutrans folder in "My Documents".



This is a short guide to compiling your own pakset, specifically Pak128.Britain-Ex. I wrote this without going through it again, so I devised it from memory. If there are issues, let me know.

  • Install Python from here, I would go for 2.7.10 but this is open to your preference.
  • Install the MakeObject Script Engine from here.
  • Download a fresh copy of PakBritain from GitHub, the branch (above the file list) is currently "half-heights" as of May 2015. Extract this to a folder like in step 2 above.
  • Download the Extended Makeobj.exe from here. You will only need makeobj.exe and can move it into the PakBritain folder.
  • Find "makeALL.mos" in the main folder and edit the file with Notepad or similar. Replace config config "makeobj=%makeobj%" with "makeobj=makeobj.exe".
  • Run "makeALL.mos".
  • Wait for the script to complete, which usually takes a few minutes. While it does that, download the folders for inside the completed pak from here.
  • When the script has finished, copy/move the "Pak128.Britain-Ex-0.9.X", from within original folder you extracted the GitHub sources in, to your previously compiled Simutrans Extended game folder.
  • Extract the folders for inside the completed pak from two steps ago into the "Pak128.Britain-Ex-0.9.X" folder.
  • Start Simutrans.exe to check whether the pak runs.
Thank you to jamespetts, VS, and all others in the project.

Moderator note: References to "Simutrans-Experimental" changed to "Simutrans-Extended" 13 February 2017.
« Last Edit: December 29, 2017, 11:45:16 AM by Spenk009 »

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 17449
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: How to compile Simutrans Experimental with MSVC 2012
« Reply #1 on: December 29, 2014, 08:14:35 PM »
Splendid - thank you for posting that. That will surely help people new to the code. I will sticky this.
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.

Offline Junna

  • Devotee
  • *
  • Posts: 1061
Re: How to compile Simutrans Experimental with MSVC 2012
« Reply #2 on: January 01, 2015, 02:43:08 AM »
I have been able to compile in the past, but now I get an error:

C2065: "remaining_wear_capacity", undeclared identifier, in weg.h

Is there a new dependency?

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2375
  • Languages: EN
Re: How to compile Simutrans Experimental with MSVC 2012
« Reply #3 on: January 01, 2015, 05:17:53 AM »
The name of that indicates an internal declaration inside the solution (not many standard libraries would use "remaining_wear_capacity" as a name). Either you have forgotten to update one of the files or there is currently a compile error in the GIT.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 17449
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: How to compile Simutrans Experimental with MSVC 2012
« Reply #4 on: January 01, 2015, 10:38:54 AM »
Ahh - did some of my way wear mechanics accidentally make it into way-improvements? My apologies. If you are on the way-improvements branch, you can delete references to remaining_wear_capacity for now: this feature will be added in when you merge from the new way-wear branch.
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.

Offline Junna

  • Devotee
  • *
  • Posts: 1061
Re: How to compile Simutrans Experimental with MSVC 2012
« Reply #5 on: January 01, 2015, 04:37:37 PM »
Well, I don't know how to do that, I only use it to download the sources, I don't know how to actually use the git.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 17449
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: How to compile Simutrans Experimental with MSVC 2012
« Reply #6 on: January 01, 2015, 04:57:37 PM »
It may be easier in that case to use your existing binary until I am able to fix it.
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.

Offline Rollmaterial fi

  • Devotee
  • *
  • Posts: 481
  • Languages: EN, FR, DE, FI, SE
Re: How to compile Simutrans Experimental with MSVC 2012
« Reply #7 on: July 16, 2015, 09:03:32 PM »
Thanks for this very helpful post! Does it apply to compiling in 64-bit too?

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 17449
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: How to compile Simutrans Experimental with MSVC 2012
« Reply #8 on: July 16, 2015, 10:16:50 PM »
There are, I understand, some significant problems associated with the 64-bit version of Simutrans for Windows, which are part of the basic Simutrans code and not specific to Experimental. It is better to compile a 32-bit binary, which will run perfectly well on 64-bit Windows.
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.

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2375
  • Languages: EN
Re: How to compile Simutrans Experimental with MSVC 2012
« Reply #9 on: July 17, 2015, 01:24:24 AM »
Quote
There are, I understand, some significant problems associated with the 64-bit version of Simutrans for Windows, which are part of the basic Simutrans code and not specific to Experimental. It is better to compile a 32-bit binary, which will run perfectly well on 64-bit Windows.
64bit standard simutrans builds with MSVC and runs perfectly as far as I can tell. The only problem is that outside of allowing larger maps and paks it actually lowers performance due to worse memory density and less optimum cache usage. This is mostly due to some small but very common objects being made larger (less dense) and object references being larger.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 17449
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: How to compile Simutrans Experimental with MSVC 2012
« Reply #10 on: July 17, 2015, 08:43:26 AM »
If I remember correctly, because of the internal memory pool systems using 32-bit integers, running in 64-bit mode does not allow the game to use more memory than it would running as a 32-bit application on a 64-bit operating system.
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.

Offline Rollmaterial fi

  • Devotee
  • *
  • Posts: 481
  • Languages: EN, FR, DE, FI, SE
Re: How to compile Simutrans Experimental with MSVC 2012
« Reply #11 on: October 31, 2015, 04:52:03 PM »
Which configuration should be compiled?

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2375
  • Languages: EN
Re: How to compile Simutrans Experimental with MSVC 2012
« Reply #12 on: October 31, 2015, 05:43:03 PM »
32bit mostly. Only use 64bit if you encounter out of memory errors.

Offline Rollmaterial fi

  • Devotee
  • *
  • Posts: 481
  • Languages: EN, FR, DE, FI, SE
Re: How to compile Simutrans Experimental with MSVC 2012
« Reply #13 on: October 31, 2015, 05:50:03 PM »
32bit mostly. Only use 64bit if you encounter out of memory errors.
I mean between debug and release, but thanks for that as I could have memory problems too! By the way, how well should a 1026*1710 map work in 32 bit?

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2375
  • Languages: EN
Re: How to compile Simutrans Experimental with MSVC 2012
« Reply #14 on: October 31, 2015, 05:52:23 PM »
Debug if you are a developer or plan to leave developer feedback or develop yourself, Release if you just want to play. Debug performs a lot slower but has full strack trace information for errors. Release it heavily optimized so performs better but on errors you get a lot of as good as garbage optimized code traces.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 17449
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: How to compile Simutrans Experimental with MSVC 2012
« Reply #15 on: November 01, 2015, 10:01:35 PM »
Dr. Supergood is correct about debug/release. As to 32/64-bit, compile as 32 bit in Windows, and 64-bit for 64-bit Linux. Simutrans cannot work with a 64-bit address space and is not optimised for 64-bit use (the low level code was written long ago). A 64-bit build will work, but there is no advantage to it, except on Linux, where 32-bit builds do not work reliably on 64-bit versions of the operating system for some unknown reason.
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.

Offline laos

  • *
  • Posts: 40
  • Languages: EN
Re: How to compile Simutrans Experimental with MSVC 2012
« Reply #16 on: December 26, 2016, 07:24:17 PM »
The bzlib files are sadly 404ing. Any chance someone who has a copy can reupload them to this thread for those who wish to compile in Windows?

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 17449
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: How to compile Simutrans Experimental with MSVC 2012
« Reply #17 on: December 26, 2016, 07:33:16 PM »
Sadly, I am not near my Windows computer that has a copy of these at present, as I am staying with my parents for Christmas; you might try searching online for it? I suspect that there must be a binary of this for Windows around somewhere.
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.

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2375
  • Languages: EN
Re: How to compile Simutrans Experimental with MSVC 2012
« Reply #18 on: December 26, 2016, 10:50:08 PM »
You can self build the library, which is what I did.

bzip2 I believe is the official site.

Offline laos

  • *
  • Posts: 40
  • Languages: EN
Re: How to compile Simutrans Experimental with MSVC 2012
« Reply #19 on: December 28, 2016, 06:50:03 AM »
I found this github to be useful: https://github.com/philr/bzip2-windows/releases

the "developer files" include the related .h and .lib - I also happened to need the .dll when launching :)

So far was able to get win32 to compile. x64 is not working (getting a lot of different header and library file requests including SDL and allegro) - not sure if I'm doing something wrong as I'm not very adept with Visual Studio.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 17449
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: How to compile Simutrans Experimental with MSVC 2012
« Reply #20 on: December 28, 2016, 12:02:35 PM »
You do not need to compile the 64-bit version; there is no advantage to doing so, since Simutrans in any event uses an internal memory management system that cannot take advantage of more than 4Gb of RAM. There are no significant systems in Simutrans that take advantage of actual 64-bit computation. Although I have compiled Windows 64-bit versions in the past, I have not done so recently, and the code would probably need updating to allow for this.
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.

Offline Spenk009

  • *
  • Posts: 182
Re: How to compile Simutrans Extended with Visual Studio 2015
« Reply #21 on: December 29, 2017, 11:47:16 AM »
I have updated the build instructions on the executable. If anyone notices a mistake or inaccuracy, send me a pm so I can fix it.

Merry Christmas everyone!

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 17449
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: How to compile Simutrans Extended with Visual Studio 2015
« Reply #22 on: December 29, 2017, 12:01:49 PM »
Splendid, thank you.
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.

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2375
  • Languages: EN
Re: How to compile Simutrans Extended with Visual Studio 2015
« Reply #23 on: December 29, 2017, 07:11:30 PM »
Quote
There are no significant systems in Simutrans that take advantage of actual 64-bit computation.
Actually a lot of Simutrans benefits from it. Everything from the graphics routines to factory production benefits with speedups. This is because x86-64 allows single instruction operations on 64bit types as well as having RISC style several general purpose registers allowing for fast function call protocols.

The only slowdown with x86-64 over x86 builds is the 64bit (8 byte) pointer types. Since Simutrans is mostly memory IO bottlenecked, the decrease in memory density as a result of increased pointer size type causes a significant performance decrease. This undoes most of the performance gains from x86-64, except perhaps on the most modern of computer systems where performance is not really a design factor anyway.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 17449
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: How to compile Simutrans Extended with Visual Studio 2015
« Reply #24 on: December 29, 2017, 07:15:42 PM »
I have noticed that, on the very largest maps, Simutrans-Extended is coming close to consuming 4Gb of RAM, so it may well be worthwhile switching to compiling for Windows in 64-bit sometime next year. This will take some time, however.
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.

Offline Matthew

  • *
  • Posts: 98
  • Languages: EN, some ZH, DE & SQ
Re: How to compile Simutrans Extended with Visual Studio 2015
« Reply #25 on: April 30, 2018, 05:26:39 PM »
I have attempted to follow the OP's instructions but the build fails. I have not done any programming for almost three decades, and never before with C++, so this is surely due to mistakes on my part. I notice that I have different Include files from the screenshot that spenk009 kindly provided. Here is my main Include config from the MSVC Properties dialogue:



And here is the included libraries list:



I don't have the "..\OpenTTD\shared\include" or "..\bzip\include" items. The former two are not in the Simutrans-Extended directory tree. Should I download them from elsewhere?

I added the MSVS item ("Microsoft Visual Studio 14.0\VC\include"), but the build still failed and I got 1,150 warnings, and the following error (13 times):



I can't find a revision.h file anywhere in the Simutrans-Ex or -Standard trees on Github, although I could find multiple references to it in the code.

Any advice on how to compile would be much appreciated. Assume I am an idiot!

I am using MSVS Express for Desktop 2015 on Windows 7.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 17449
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: How to compile Simutrans Extended with Visual Studio 2015
« Reply #26 on: May 01, 2018, 10:51:39 PM »
Sorry that you are having trouble with this. This thread contains a discussion of the issue that you are experiencing. In short: revision.h is an automatically generated file. Somebody else wrote the code for the automatic generation, and I do not know how it works, so cannot debug this when it goes wrong. However, a workaround is simply to have a blank revision.h file, albeit the revision versioning system will not work (but this is not critical for anything other than release/nightly builds).

Offline Matthew

  • *
  • Posts: 98
  • Languages: EN, some ZH, DE & SQ
Re: How to compile Simutrans Extended with Visual Studio 2015
« Reply #27 on: May 02, 2018, 08:37:00 PM »
James, thank you for taking the time to track down that thread. I should have searched the forum myself: it's the obvious self-help step in hindsight. Happily, I tried Ves' workaround (just create a blank file) and it seems to have worked: the revision.h errors have disappeared. However, I now have errors because I don't have the files allegro.h, pthreads.h, and sdl.h. That seems to be the same issue discussed in this thread.

Based on the discussion there, could you (or spenk009) please clarify:
- Should I be setting the build options as 'Release' and 'x64' or something else? I am building on, and for, Windows 7 64-bit.
- I have been opening the Simutrans-Extended.sln file in MSVS. Is that correct?

I'm also going to double-check that my MSVS has all the updates it needs, in case that is the problem.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 17449
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: How to compile Simutrans Extended with Visual Studio 2015
« Reply #28 on: May 02, 2018, 09:48:04 PM »
You can build either as "release" or "debug", although you might be better building as (the perhaps inappositely named) "Debug (open GL)". Again, you can build in either Win32 or x64, but x64 is preferred as the 32 bit builds are prone to running out of memory on large maps.

Visual Studio 2015 is indeed the correct application for opening these files and building Simutrans-Extended for development purposes.

If you are self-building, you might find debug builds more useful than release builds because Visual Studio builds will not stay in sync with a server running a GCC build, whereas cross-compiled GCC builds will stay in sync. (In principle, this is a bug, but it would be so fantastically difficult to track down that it is not worthwhile to do so given that there is such an easy workaround, viz. using the cross-compiled builds which are produced nightly).

What it looks like you need to do from your descriptions of the errors is to point your project file to the correct directories that contain the include files for pthreads and SDL. You should not need allegro.h, so you might want to check your build properties to see whether you are incorrectly trying to build a code file that refers to this header file.

Offline Matthew

  • *
  • Posts: 98
  • Languages: EN, some ZH, DE & SQ
Re: How to compile Simutrans Extended with Visual Studio 2015
« Reply #29 on: May 05, 2018, 01:03:27 AM »
James, thank you for the advice. I am now working with the "Debug (OpenGL)" config and I have gradually eliminated a series of errors over the course of a couple of dozen build attempts, all caused by my own mistakes, but I've now got two new ones that are foxing me. I get the following errors when I try to compile:



As these are problems with intermediate objects that MSVS creates during the compilation process, I tried deleting the intermediate files (in /x64/Debug (OpenGL)/) in case they were left over from from an earlier botched build but then I get what are ostensibly internal compiler errors (C1001 and D8040), i.e. bugs in MSVS, but I don't doubt for a moment that they're actually my errors, not Microsoft's. I noticed that the Output View also gave these hints:



That suggests that I've somehow downloaded 32-bit versions of the libraries, so I'll try re-downloading and reinstalling those in the morning.

Searching through the game's filetree for compilation hints, I noticed that there is a config.default file. Although the OP's instructions don't mention the need to change this, the config.default that I have pulled from jamespetts/simutrans-extended/simutrans/master/ (copied below) is set to mingw2, and seems to be very different from the config.default that is used by Simutrans-Standard and the settings in jamespetts/simutrans-extended/config.template. The MS help pages for C1001 and D8040 say that they can sometimes be caused by incorrect compilation flags. Is the config.default only used when compiling with mingw2, or do I need to set it to different options for MSVS?

BTW I also get thousands of Warnings when I try to compile; I take it that is normal for a complex, legacy programme like Simutrans?

Code: [Select]
#
# to compile:
# copy this file to config.default and adjust the settings
#

#BACKEND = allegro
BACKEND = gdi
#BACKEND = sdl
#BACKEND = mixer_sdl
#BACKEND = x11

#COLOUR_DEPTH = 8
#COLOUR_DEPTH = 16

#OSTYPE = beos
#OSTYPE = cygwin
#OSTYPE = freebsd
#OSTYPE = linux
OSTYPE = mingw
#OSTYPE = mac

#DEBUG = 3    # Level 1-3, higher number means more debug-friendly, see Makefile
#OPTIMISE = 1 # Add umpteen optimisation flags
PROFILE = 1

# Define these as empty strings, if you don't have allegro/sdl-config
#ALLEGRO_CONFIG = allegro-config
#SDL_CONFIG = sdl-config

#VERBOSE = 1

# Do not determine dependencies
# Header dependencies get NOT tracked this way, so if a header changes you're
# on your own (i.e. manually run a make clean)
# Uncomment this if this stage takes exceptionally long, which happens on some
# broken filesystems
# NO_DEPS = 1

# Following flags exists
# DOUBLE_GROUNDS: Enables two height tiles
# HALF_HEIGHT: Enables half height tiles (8 pixel instead 16)
# OTTD_LIKE: Enables half height tiles and crossconnected industries; defaul folder pak.ttd/
# DESTINATION_CITYCARS: Citycars can have a destination (not recommended)
# USE_C: no assembler for copying
# BIG_ENDIAN: MUST by set for PPC/Motorola byte order! (old mac, amiga)
# STEPS16: 16 steps per tile - nicer on pak64
# NEW_PATHING: New pathing system. Not recommended to omit this.
FLAGS =  -NEW_PATHING

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 17449
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: How to compile Simutrans Extended with Visual Studio 2015
« Reply #30 on: May 05, 2018, 01:26:35 AM »
The config.default file is not used when compiling with Visual Studio: this is only used when compiling with GCC or a derivative such as MinGW.

The errors that you describe look like a failure to have the correct library files for pthreads, which is the multi-threading interface. It is possible that you have the 32-bit rather than 64-bit version, but also check that you are pointing to the directory with the libraries in Visual Studio's libraries folder.

As to the warnings, Simutrans has always been quite heavy on warnings: most of them are inherited from Standard.

Very best wishes in getting this to compile!

Offline Matthew

  • *
  • Posts: 98
  • Languages: EN, some ZH, DE & SQ
Re: How to compile Simutrans Extended with Visual Studio 2015
« Reply #31 on: May 06, 2018, 12:52:22 AM »
James, thank you for explaining that config.default is irrelevant; that's one line of enquiry ruled out.

I've spent another few hours on this today. As you suggested, my previous problem seems to be caused by a 32-bit (x86) library. It seems that most of the libraries provided in the OpenTTD download and linked to in the compilation guides are 32-bit, so I am having to trawl the Web looking for x64 builds (I suspect that it's the same journey that you took in the cross-compilation thread, albeit in a different vehicle). I think I've now got working versions of pthreads and bzip. I installed a 64-bit version of zlib using NuGet, which is MSVS' built-in library manager.  I found an x64 libpng file with NuGet, but unfortunately it seems to be a different version of libpng from the one that your source code uses, with different filenames.

Could you please let me know exactly which versions of freetype2 and libpng you are using for the 64-bit Windows builds? The latest stable version of libpng is 1.6.3.4, and I think that's what NuGet is providing. If I've got to build these libraries myself, then I'd like to make sure that I stay consistent with you.

DrSuperGood, I think you're also compiling with x64 in MSVS - where did you find freetype2 and libpng libraries, please? NuGet or elsewhere?

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 17449
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: How to compile Simutrans Extended with Visual Studio 2015
« Reply #32 on: May 06, 2018, 02:41:42 PM »
The libraries that I use are from a recent version of OpenTTD, which do include 64-bit versions. My versions.txt file states the following:

Code: [Select]
The used versions for the libaries in this archive:
freetype 2.6
icu4c 55.1
liblzma 5.2.1
libpng 1.6.18
lzo 2.09
zlib 1.2.8

For the actual sources we redirect you to the sources archive that is located next to this archive.

Does this assist?

Offline Matthew

  • *
  • Posts: 98
  • Languages: EN, some ZH, DE & SQ
Re: How to compile Simutrans Extended with Visual Studio 2015
« Reply #33 on: May 16, 2018, 08:53:17 AM »
James, now that the double-post rule has been relaxed, I can write: thank you for this information. I seem to have damaged my Git repository, so I'll get help from that in a more appropriate forum and then review all these libraries to make sure that I've got the right versions.