From 43b0d3a279de7231d4062d1921b0e5a0ee1e42bb Mon Sep 17 00:00:00 2001 From: Paul Molodowitch Date: Tue, 2 Nov 2021 17:44:21 -0700 Subject: [PATCH] collection of fixes for building without pre-compiled headers ie, if -DPXR_ENABLE_PRECOMPILED_HEADERS=OFF wanted to build without precompiled headers to help with debugging a strange build issue (ie, create more transparent + atomic build steps) also, turning off PCH usage allows stashed.io (a caching compiler wrapper for MSVC) to operate when using PDB (see: https://github.com/playscale/stashed.io/wiki/PDB-and-PCH-generation) most fixes are pretty self-explanatory - adding some missing headers to individual source / header files in stackTrace.cpp, the include of Winsock2.h must happen before windows.h, which is brought in via fileSystem.h See: https://github.com/PixarAnimationStudios/USD/pull/1672 --- stackTrace.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/stackTrace.cpp b/stackTrace.cpp index 54f11a4..beb9c0a 100644 --- a/stackTrace.cpp +++ b/stackTrace.cpp @@ -32,6 +32,11 @@ #include "pxr/base/arch/error.h" #include "pxr/base/arch/errno.h" #include "pxr/base/arch/export.h" +#if defined(ARCH_OS_WINDOWS) +// Need to include Winsock2.h BEFORE windows.h - which is included in +// fileSystem.h +#include +#endif #include "pxr/base/arch/fileSystem.h" #include "pxr/base/arch/inttypes.h" #include "pxr/base/arch/symbols.h" @@ -39,7 +44,6 @@ #if defined(ARCH_OS_WINDOWS) #include #include -#include #include #ifndef MAXHOSTNAMELEN #define MAXHOSTNAMELEN 64