Problem with precompiled header when compiling GZDoom

Discuss anything ZDoom-related that doesn't fall into one of the other categories.
Post Reply
User avatar
RederickDeathwill
Posts: 31
Joined: Sun Sep 06, 2020 4:18 pm
Graphics Processor: nVidia (Modern GZDoom)
Location: São Paulo - Brazil
Contact:

Problem with precompiled header when compiling GZDoom

Post by RederickDeathwill »

So, I've been trying to compile GZDoom on Windows 10 on Visual Studio 2019 Community Edition for days now and I'm stuck with this problem:


Code: Select all

Error	C1083	Cannot open precompiled header file: 'D:/Workspace/BRZDoom/src/g_pch.pch': No such file or directory	D:\Workspace\BRZDoom\out\build\x64-Debug\BRZDoom	D:\Workspace\BRZDoom\src\doomstat.cpp	1	
Since it's a cmake project, I've tried disabling the precompiled header for this file manually on CMakeLists.txt:

Code: Select all

set_source_files_properties(src/g_pch.h PROPERTIES SKIP_PRECOMPILE_HEADERS ON)
set_source_files_properties(src/g_pch2.h PROPERTIES SKIP_PRECOMPILE_HEADERS ON)
It did not work. I've only managed to compile GZDoom on Ubuntu and Fedora so far, but on Windows I'm having this very specific problem. Did anyone ever had a similar problem?
_mental_
 
 
Posts: 3820
Joined: Sun Aug 07, 2011 4:32 am

Re: Problem with precompiled header when compiling GZDoom

Post by _mental_ »

Are you using CMake integrated into Visual Studio? If so, download standalone CMake, and do projects/solution generation there.
User avatar
RederickDeathwill
Posts: 31
Joined: Sun Sep 06, 2020 4:18 pm
Graphics Processor: nVidia (Modern GZDoom)
Location: São Paulo - Brazil
Contact:

Re: Problem with precompiled header when compiling GZDoom

Post by RederickDeathwill »

_mental_ wrote:Are you using CMake integrated into Visual Studio? If so, download standalone CMake, and do projects/solution generation there.
Bloody hell, that's it! Yes, I was using the integrated one and haven't tried with the standalone CMake. I've generated the solution based on my Visual Studio version and it worked like a charm, didn't even complain about those precompiled headers. Beautiful, thank you very much! That was really helpful.
Post Reply

Return to “General”