Visual Studio 2015 Community edition wont compile

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Post Reply
benem
Engineer
Engineer
Posts: 4
Joined: 09 Dec 2013 10:39

Visual Studio 2015 Community edition wont compile

Post by benem »

Hi all

I'm trying to compile OpenTTD with Visual Studio 2015 Community edition update 3.

I've follow all the instructions. Get the latest source with svn, get the latest OpenTTD essentials and configure VS to point to it (include and library path).

But when I start to compile, I get a lot of error on fttypes.h system include file while compiling crashlog.cpp

The first (of over 280) is:

Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int (compiling source file ..\src\crashlog.cpp) openttd C:\Program Files (x86)\Windows Kits\10\Include\10.0.10586.0\shared\fttypes.h 38

Basically it seems that LONGLONG is not defined when included fttypes.h

Undefining WITH_FREETYPE doesn't help.

Thank you for your help.
benem
Engineer
Engineer
Posts: 4
Joined: 09 Dec 2013 10:39

Re: Visual Studio 2015 Community edition wont compile

Post by benem »

I've found the problem.

It seems that in the new windows SDK that come with VS 2915 Update 3 there is an incompatible fttypes.h include file.

The solution is to put the directory of OpenTTD essentials before the predefined include directories in VC++ Directories/Include Directories option.
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4760
Joined: 09 Sep 2007 05:03
Location: home

Re: Visual Studio 2015 Community edition wont compile

Post by Alberth »

Please note that in the wiki, so others can find it too
Being a retired OpenTTD developer does not mean I know what I am doing.
coherently_olive
Engineer
Engineer
Posts: 14
Joined: 24 Apr 2015 17:16

Re: Visual Studio 2015 Community edition wont compile

Post by coherently_olive »

The information in the Wiki has been very helpful for me when compiling with Visual Studio 2015. Just a quick note: Step 2.1 says to close Visual Studio and install the Windows SDK, which did not work in my case. Instead, Visual Studio asked to download and install the Windows SDK automatically when I tried to open the solution file. This worked fine and the solution loaded correctly after restarting Visual Studio (I already had .NET Framework 4.6 installed before trying to load the solution file the first time).
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 3 guests