Page 1 of 1

How-To: Compile on Windows

Posted: Wed Oct 19, 2016 17:01
by Rachael
If you wish to compile QZDoom on Windows, the instructions are the same as found here:

Compile ZDoom on Windows

There are some exceptions.

Use this git repository: https://github.com/raa-eruanna/qzdoom

You also must download additional LLVM libraries: http://qzdoom.drdteam.org/download/development/

Install them by simply dropping the "llvm" folder into the root of your QZDoom source tree. CMake will find them automatically and use them.

Everything else should be the same.

(If you are a true open source fanatic, you can compile the LLVM libraries yourself - but bear in mind this takes up a ton of room on your hard drive and can take hours to complete - these precompiled libraries are provided as a convenience to get you up and going much more quickly)

Re: How-To: Compile on Windows

Posted: Sun Nov 20, 2016 12:35
by XxMiltenXx
Hey, could you update your pre-combiled llvm-builds please? The latest QZDoom source now also uses llvm-bitreader, which doesn't seem to be included in the previous pre-compiled version.

Re: How-To: Compile on Windows

Posted: Sun Nov 20, 2016 13:06
by dpJudas
You can find the missing .lib file in the llvm-3.9.0-everything.7z package. Either unzip that one instead, or copy the 4 versions of the bitreader lib file.

Eruanna: Can you add those to the smaller .7z files, or do you want me to do it? Probably easier if you do it as we don't need to find a way for me to send those files to you then. :)

Re: How-To: Compile on Windows

Posted: Sun Nov 20, 2016 13:55
by XxMiltenXx
dpJudas wrote:You can find the missing .lib file in the llvm-3.9.0-everything.7z package. Either unzip that one instead, or copy the 4 versions of the bitreader lib file.
Ah, thank you. I meant Bitwriter, but I found the files in there as well.

Re: How-To: Compile on Windows

Posted: Sun Nov 20, 2016 16:37
by Rachael
dpJudas wrote:Eruanna: Can you add those to the smaller .7z files, or do you want me to do it? Probably easier if you do it as we don't need to find a way for me to send those files to you then. :)
Can you give me an exact file name list that I can just input in on the shell?

Re: How-To: Compile on Windows

Posted: Sun Nov 20, 2016 16:47
by dpJudas
Sure. The missing files are:

llvm\32bit-debug\LLVMBitWriter.lib
llvm\32bit-release\LLVMBitWriter.lib
llvm\64bit-debug\LLVMBitWriter.lib
llvm\64bit-release\LLVMBitWriter.lib

Re: How-To: Compile on Windows

Posted: Sun Nov 20, 2016 16:52
by Rachael
The files should be updated now. Or at the very least, 7za said "Everything is Ok" 4 times on the shell. >_>

Re: How-To: Compile on Windows

Posted: Sun Nov 20, 2016 17:02
by dpJudas
Perfect. Thanks Eruanna.

Re: How-To: Compile on Windows

Posted: Sun Nov 20, 2016 18:48
by Rachael
You're welcome. :)

Re: How-To: Compile on Windows

Posted: Fri Dec 16, 2016 17:01
by XxMiltenXx
I cannot compile QZDoom anymore. I checked why, apparently my CMake doesn't find the llvm libraries automatically anymore. The funny thing is: Even with 64-Bit selected he looks for the 32-bit ones (which obviously won't work). I am using Windows 10 64-Bit and CMake 3.5.1 (32 bit) and now tested CMake 3.7.1 (64 bit), both the same result. Since 2 weeks or so it cannot find them automatically and selecting them all manually is a bit cumbersome. I think the error persists since you added something called "drawergen" but not sure if that is related in any way.
The error message I am getting in CMake is

Code: Select all

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
LLVM_analysis_LIBRARY_RELEASE
    linked by target "drawergen" in directory C:/qzdoom/src/tools/drawergen
and then he simply says that all the LLVM stuff is missing (even though it is in the QZDoom source tree).

Any idea to why this is happening?

I am using Visual Studio 14 2015 Win64.

Re: How-To: Compile on Windows

Posted: Fri Dec 16, 2016 17:34
by dpJudas
Maybe I broke something when I moved over the LLVM stuff from one CMakeLists.txt file to another. That did indeed happen when I moved the LLVM code generation to its own utility (drawergen). It is probably the search path that is wrong. It looks correct to me, though. I'm assuming I'll have to fully clean out my build directory to see this, because it has been working fine on my computer so far.

Re: How-To: Compile on Windows

Posted: Fri Dec 16, 2016 18:28
by XxMiltenXx
I just did a test within "tools/drawergen" and edited the CMakeLists.txt.

Code: Select all

	include_directories( "${LLVM_PRECOMPILED_DIR}/include" )
	if( X64 )
		include_directories( "${LLVM_PRECOMPILED_DIR}/64bit-include" )
		set( llvm_libs_base "${LLVM_PRECOMPILED_DIR}/64bit-" )
	else()
		include_directories( "${LLVM_PRECOMPILED_DIR}/32bit-include" )
		set( llvm_libs_base "${LLVM_PRECOMPILED_DIR}/32bit-" )
	endif()
Just for testing I changed the entries for 32-bit to "64bit". That worked and the CMake low loaded the correct LLVM files. So it seems that my CMake doesn't recognize that it has to look for the 64-bit ones.

Still getting an error message on compiling though:

Code: Select all

"C:\qzdoom\build64\qzdoom.sln" (Build Ziel) (1) ->
"C:\qzdoom\build64\ALL_BUILD.vcxproj.metaproj" (Standardziel) (2) ->
"C:\qzdoom\build64\wadsrc_bm\brightmaps_pk3.vcxproj.metaproj" (Standardziel) (4) ->
"C:\qzdoom\build64\src\zdoom.vcxproj.metaproj" (Standardziel) (5) ->
"C:\qzdoom\build64\src\drawergen_target.vcxproj.metaproj" (Standardziel) (8) ->
"C:\qzdoom\build64\tools\drawergen\drawergen.vcxproj.metaproj" (Standardziel) (9) ->
"C:\qzdoom\build64\tools\drawergen\drawergen.vcxproj" (Standardziel) (10) ->
(ClCompile Ziel) ->
  C:\qzdoom\src\tools\drawergen\..\..\llvm\include\llvm/Support/Compiler.h(18): fatal error C1083: Cannot open include
file: 'llvm/Config/llvm-config.h': No such file or directory [C:\qzdoom\build64\tools\drawergen\drawergen.vcxproj]
I also tried already completely refreshing my whole source tree, with deleting the old and re-downloading it again, still cannot get it done.

EDIT:
I changed the

Code: Select all

 if ( x64)
(mentioned above)
to

Code: Select all

 if( CMAKE_SIZEOF_VOID_P EQUAL 8 )
and now CMake has properly detected 64-bit and has now compiled without a problem.

Re: How-To: Compile on Windows

Posted: Fri Dec 16, 2016 19:06
by dpJudas
Ah, seems the CMakeLists.txt file I grabbed the stuff from had this at the very top:

Code: Select all

if( CMAKE_SIZEOF_VOID_P MATCHES "8" )
	set( X64 64 )
endif()
So that explains why it stopped working when I moved it, and why your fix got it working again. :)