Problems compiling (G)ZDoom

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
Sunbeam
Posts: 104
Joined: Tue Apr 09, 2013 4:38 am
Contact:

Problems compiling (G)ZDoom

Post by Sunbeam »

Using:
GCC 4.7.1
GZDoom SVN rev1600
Windows XP

What I did:
Following this page: http://zdoom.org/wiki/Compile_ZDoom_on_Windows
  • Downloaded and extracted w32api-3.17-2-mingw32-dev.tar.lzma. The Wiki did not specify which file I needed.
  • Downloaded and extracted http://alleg.sourceforge.net/files/dx80_mgw.zip (the minimal DirectX 8 files).
  • Downloaded CMake 2.8.11.1 for Windows.
  • Changed the file mingw\include\commctrl.h as stated in the Wiki.
  • Put nasmw.exe and ndisasmw.exe in my MinGW bin folder.
  • Started CMake and clicked on Configure.
CMake log:
Spoiler:
The thread title is so unspecific because I experienced additional and more diverse errors while trying to compile the source with different setups so I guess there's more to come.

What I noticed:
- It seems the Wiki is outdated and ZDoom uses DirectX 9 now instead of 8. I found the "minimal header files" for DX9 on the Allegro page but it has no xinput.h in it so it's useless in this case.
- Having a DirectX SDK installed while trying to run CMake for MinGW seems to mess it up somehow.

Please enlighten me on this topic. :)
User avatar
Sunbeam
Posts: 104
Joined: Tue Apr 09, 2013 4:38 am
Contact:

Re: Problems compiling (G)ZDoom

Post by Sunbeam »

The current CMake seems to have some errors that need to be fixed. I solved the first CMake problems by using the older version 2.6.4.
I then let CMake use my installed DirectX SDK (Feb 2010) which fixed the header errors.
Then I got an error from src/win32/i_input.cpp which stated that GET_XBUTTON_WPARAM was not defined. I checked this and neither MinGW nor the newest win32-api has that defined anywhere so I copied the define over from i_mouse.cpp.
After that more errors popped up which seem to come from the fact that I tried to use the DX SDK with MinGW. Here are some of them:
Spoiler:
Either I'm missing some information or ZDoom has not been compiled with MinGW for quite some time. Please tell me what I have to do to get it to compile.
User avatar
PaganRaven
Posts: 439
Joined: Fri Oct 14, 2005 2:21 pm

Re: Problems compiling (G)ZDoom

Post by PaganRaven »

I'm having the same problem. Nobody wants to help? Graf?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Problems compiling (G)ZDoom

Post by Graf Zahl »

The only advice I can give is not to use MinGW. It's pretty much unsupported as none of the active developers uses this compiler.
As the errors say, ZDoom requires DirectX 9, so 'minimal DirectX 8' is most likely insufficient to compile it. The help instructions are quite old and may no longer apply.

So, all I can recommend is to get the Visual Studio 2013 Community edition and use that to compile.
User avatar
phantombeta
Posts: 2179
Joined: Thu May 02, 2013 1:27 am
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: Brazil

Re: Problems compiling (G)ZDoom

Post by phantombeta »

You don't even need VS2013. MSVC++ 2008 Express should be enough to compile ZDoom.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Problems compiling (G)ZDoom

Post by Graf Zahl »

'enough' or not, there's no reason to search for a 5 year old compiler if the current one that's readily available works also.
User avatar
phantombeta
Posts: 2179
Joined: Thu May 02, 2013 1:27 am
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: Brazil

Re: Problems compiling (G)ZDoom

Post by phantombeta »

There are several reasons not to.
First, your computer might not be able to run it.
Second, MSVS 2013 is about 6 GB.
I decided to download 2012 instead of 2013 because my connection is not completely stable and it would take hours (More than 8 hours, I believe.) to download MSVS 2013.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Problems compiling (G)ZDoom

Post by Graf Zahl »

phantombeta wrote: First, your computer might not be able to run it.
Wait a minute...
People are still using Windows XP...? :mrgreen:
User avatar
PaganRaven
Posts: 439
Joined: Fri Oct 14, 2005 2:21 pm

Re: Problems compiling (G)ZDoom

Post by PaganRaven »

Well, whatever you say. It's easy to compile it on linux, but if the only way to compile a windows build is with VS2013, so be it... it's just, as someone else has said, a bloated piece of software to have to rely on, and the way folders are organized in the project layout is pretty weird (as in, not the exact way the files are actually arranged in the physical directory). Thanks for all the work you've done on this, Graf.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Problems compiling (G)ZDoom

Post by Graf Zahl »

Why Visual Studio? Actually quite simple: The only alternative on Windows is MinGW and, to be blunt, it's a pretty shitty package - not the compiler itself but the accompanying libraries, worst of all being that it relies on an ancient CRT.DLL by Microsoft and a profound lack of header support for more modern stuff.

You should be able to compile ZDoom and ZDoom with any Visual Studio back to 2005, but never forget that the price of this is that we cannot use any modern language features AT ALL.
Locked

Return to “Editing (Archive)”