[Tutorial] Compiling the GZDoom source code with CMake

Discuss anything ZDoom-related that doesn't fall into one of the other categories.

Re: [Tutorial] Compiling the GZDoom source code with CMake

Postby Graf Zahl » Sun Aug 10, 2014 5:54 pm

That should work, too, but I generally found the 2005 compiler to be more stable.
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: [Tutorial] Compiling the GZDoom source code with CMake

Postby drako » Sat Sep 03, 2016 8:08 pm

Is this tutorial still up to date? It seems to me that is not. The Wiki page http://zdoom.org/wiki/Compile_ZDoom_on_Windows for zdoom states "Visual Studio 2015 is only required for the development versions of ZDoom" . I assume the same is true about compiling development versions of GZDoom. I have just set up everything according to this tutorial (I think) and used VC++2010 express and got a lot of syntax errors (see attached file).
vs10errors.txt
(50.86 KiB) Downloaded 45 times
drako
 
Joined: 08 Jan 2016

Re: [Tutorial] Compiling the GZDoom source code with CMake

Postby dpJudas » Sat Sep 03, 2016 10:18 pm

The required downloads for Visual C++ 2015 are wrong at least.

There is no need to download the old DirectX SDK, and I don't think there's a need to download the Windows SDK either. In both cases what is bundled with Visual Studio should be enough. For example, my cmake vars are configured as follows:

Code: Select allExpand view
D3D_INCLUDE_DIR = C:/Program Files (x86)/Windows Kits/10/Include/10.0.10586.0/um
DX_dinput8_LIBRARY = C:/Program Files (x86)/Windows Kits/10/Lib/10.0.10586.0/um/x86/dinput8.lib
DX_dxguid_LIBRARY = C:/Program Files (x86)/Windows Kits/10/Lib/10.0.10586.0/um/x86/dxguid.lib
XINPUT_INCLUDE_DIR = C:/Program Files (x86)/Windows Kits/10/Include/10.0.10586.0/um

I don't think I ever downloaded the Windows 10 SDK, although I'm not 100% sure. One thing is for certain, the DirectX SDK has been merged into the Windows SDK since June 2010. :)
dpJudas
 
 
 
Joined: 28 May 2016

Re: [Tutorial] Compiling the GZDoom source code with CMake

Postby _mental_ » Sat Sep 03, 2016 11:43 pm

drako wrote:Is this tutorial still up to date? It seems to me that is not. The Wiki page http://zdoom.org/wiki/Compile_ZDoom_on_Windows for zdoom states "Visual Studio 2015 is only required for the development versions of ZDoom" . I assume the same is true about compiling development versions of GZDoom. I have just set up everything according to this tutorial (I think) and used VC++2010 express and got a lot of syntax errors (see attached file).
vs10errors.txt

You need to use Visual Studio 2015, any previous version won't build (G)ZDoom.
_mental_
 
 
 
Joined: 07 Aug 2011

Re: [Tutorial] Compiling the GZDoom source code with CMake

Postby Graf Zahl » Sun Sep 04, 2016 1:48 am

drako wrote:Is this tutorial still up to date? It seems to me that is not. The Wiki page http://zdoom.org/wiki/Compile_ZDoom_on_Windows for zdoom states "Visual Studio 2015 is only required for the development versions of ZDoom" . I assume the same is true about compiling development versions of GZDoom. I have just set up everything according to this tutorial (I think) and used VC++2010 express and got a lot of syntax errors (see attached file).
vs10errors.txt


Since GZDoom is a superset of ZDoom, any limitation in compiler environment obviously applies to both. Yes, VS 2015 is REQUIRED. ZDoom's code is C++11, which VS 2010 does not support, and VS 2012 and VS2013 only support partially, both are lacking features required by ZDoom.

@dpJudas: Interesting info about the DirectX SDK. The question now should be, do we even need the setup variables here or is this directory among the default settings for the compiler and can be removed from CMake? Unfortunately I do not know how to look what those compiler variables like $(WindowsSDK_IncludePath) actually contain.
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: [Tutorial] Compiling the GZDoom source code with CMake

Postby dpJudas » Sun Sep 04, 2016 2:17 am

Graf Zahl wrote:@dpJudas: Interesting info about the DirectX SDK. The question now should be, do we even need the setup variables here or is this directory among the default settings for the compiler and can be removed from CMake? Unfortunately I do not know how to look what those compiler variables like $(WindowsSDK_IncludePath) actually contain.

They are part of the default include/library paths in Visual Studio 2015. I just tried creating a completely new fresh Win32 project with this program:

Code: Select allExpand view

#include <Windows.h>
#include <Xinput.h>
#include <d3d9.h>

#pragma comment(lib, "dxguid.lib")
#pragma comment(lib, "xinput.lib")
#pragma comment(lib, "d3d9.lib")

int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PWSTR pCmdLine, int nCmdShow)
{
   Direct3DCreate9(D3D_SDK_VERSION);
   return 0;
}

Compiles and links here with no further changes needed. I'm not sure if CMake automatically uses the default search paths or not - my knowledge of CMake is almost non-existent I'm afraid.
dpJudas
 
 
 
Joined: 28 May 2016

Re: [Tutorial] Compiling the GZDoom source code with CMake

Postby Graf Zahl » Sun Sep 04, 2016 2:28 am

Ok. I'll try to do a setup with these options removed from CMakeLists later. Would be nice if this could simplify the setup.
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: [Tutorial] Compiling the GZDoom source code with CMake

Postby Graf Zahl » Sun Sep 04, 2016 3:31 am

Tested it and it worked out of the box. I removed the options for Visual Studio, they only remain for MinGW, although that's still not working for other reasons (and probably never will unless someone willing to bother with it fixes it.)
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: [Tutorial] Compiling the GZDoom source code with CMake

Postby DaMan » Sun Sep 04, 2016 5:33 am

You might want to get a Windows7 user to test a Xbox controller. The Windows SDK only links to the Win8/10 Xinput14 or gimped Xinput91 (unless Zdoom reports battery life for wireless controlers don't think it affects anything). IIRC Zdoom is defining WIN32_WINNT as XP before including Xinput.h so it should be linking against the latter.
DaMan
100M club member
 
Joined: 01 Jan 2010

Re: [Tutorial] Compiling the GZDoom source code with CMake

Postby Blzut3 » Sun Sep 04, 2016 12:25 pm

I suspect this broke the DRDTeam builds:
Code: Select allExpand view
    34>C:\Build\GZDoom\GZDoom-devel\src\win32\i_xinput.cpp(126): error C2065: 'XUSER_MAX_COUNT': undeclared identifier [C:\Build\GZDoom\GZDoom-devel\build\src\zdoom.vcxproj]
    34>C:\Build\GZDoom\GZDoom-devel\src\win32\i_xinput.cpp(632): error C2065: 'XUSER_MAX_COUNT': undeclared identifier [C:\Build\GZDoom\GZDoom-devel\build\src\zdoom.vcxproj]
    34>C:\Build\GZDoom\GZDoom-devel\src\win32\i_xinput.cpp(646): error C2065: 'XUSER_MAX_COUNT': undeclared identifier [C:\Build\GZDoom\GZDoom-devel\build\src\zdoom.vcxproj]
    34>C:\Build\GZDoom\GZDoom-devel\src\win32\i_xinput.cpp(680): error C2065: 'XUSER_MAX_COUNT': undeclared identifier [C:\Build\GZDoom\GZDoom-devel\build\src\zdoom.vcxproj]
    34>C:\Build\GZDoom\GZDoom-devel\src\win32\i_xinput.cpp(696): error C2065: 'XUSER_MAX_COUNT': undeclared identifier [C:\Build\GZDoom\GZDoom-devel\build\src\zdoom.vcxproj]
    34>C:\Build\GZDoom\GZDoom-devel\src\win32\i_xinput.cpp(716): error C2065: 'XUSER_MAX_COUNT': undeclared identifier [C:\Build\GZDoom\GZDoom-devel\build\src\zdoom.vcxproj]

Can't change anything on it until the 12th as I'm away from home.
Blzut3
Pronounced: B-l-zut
 
 
 
Joined: 24 Nov 2004

Re: [Tutorial] Compiling the GZDoom source code with CMake

Postby Graf Zahl » Sun Sep 04, 2016 1:05 pm

Strange. That constant is defined in Xinput.h, which is definitely part of the Windows SDK on my system.
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: [Tutorial] Compiling the GZDoom source code with CMake

Postby Greggory Lee » Tue Mar 28, 2017 1:19 pm

I can't find
__MACHINEI(unsigned char _interlockedbittestandset(long volatile *a, long b))
__MACHINEI(unsigned char _interlockedbittestandreset(long volatile *a, long b))
in intrin.h
Greggory Lee
 
Joined: 28 Mar 2017

Previous

Return to General

Who is online

Users browsing this forum: Google [Bot] and 4 guests