Open SpinnerX opened 4 months ago
The build was failing with Clang on Windows due to order of precedence of the macros for determining file size.
C:\Users\heraa.conan2\p\b\draco1d23f170ed5b0\b\src\src\draco\io\stdio_file_reader.cc:91:48: error: use of undeclared identifier 'ftello'; did you mean 'ftell'?
The _FILE_OFFSET_BITS
macro is defined in the file cmake\draco_build_definitions.cmake
. The code in question is the part below.
if(NOT MSVC)
if(${CMAKE_SIZEOF_VOID_P} EQUAL 8)
# Ensure 64-bit platforms can support large files.
list(APPEND draco_defines "_LARGEFILE_SOURCE" "_FILE_OFFSET_BITS=64")
endif()
When _FILE_OFFSET_BITS
is defined, it uses the linux only C API which fails on Windows. I decided to only change the macro order in the header file src\draco\io\stdio_file_reader.cc
because I wasn't sure if there were other potential use cases for this macro in the future.
Resolves #1018