From a0ad53b6181eac2735daa144b8f35dee88c0cd68 Mon Sep 17 00:00:00 2001 From: Corentin Wallez Date: Tue, 30 May 2017 17:59:09 -0400 Subject: [PATCH] Enable format macros in glTFViewer Without this compilation can fail in picojson.h because the PRId64 macro isn't defined (it is used to print 64bit ints). --- examples/glTFViewer/glTFViewer.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/examples/glTFViewer/glTFViewer.cpp b/examples/glTFViewer/glTFViewer.cpp index 5c26d42577..18dc37a606 100644 --- a/examples/glTFViewer/glTFViewer.cpp +++ b/examples/glTFViewer/glTFViewer.cpp @@ -12,6 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Enable this before including any headers as we want inttypes.h to define +// format macros such as PRId64 that are used in picojson. +#ifndef __STDC_FORMAT_MACROS +#define __STDC_FORMAT_MACROS +#endif + #include "Utils.h" #include