I've been trying to organize my code into sub-folders, and I've been careful to not do anything extra than that since my last commit. I am currently getting a bunch of C1010
errors saying:
unexpected end of file while looking for precompiled header. Did you forget to add #include "pch.h" to your source?
Each file does have the appropriate relative include path for the precompiled header file. If I attempt to "de-relativize" the precompiled header includes, then Intellisense starts throwing errors..
I suspect that my cmake code might be at fault here.. Specifically this section:...
if (MSVC)
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT Minecraft)
set_target_properties(Minecraft PROPERTIES COMPILE_FLAGS "/Yupch.h")
set_source_files_properties("src/pch.cpp" PROPERTIES COMPILE_FLAGS "/Ycpch.h")
target_compile_options(Minecraft PRIVATE "/W4" "/MP" "/std:c++17")
endif()
*.cpp
file start with#include "pch.h"
? – Richard Critten.cpp
file starts with the appropriate relative version of#include "pch.h"
– user7898257#include "pch.h"
as the first non empty non comment line – drescherjm#include
the path must match the name in the compiler directive, i don't think relative paths will work. – Richard Critten