我正在尝试使用 VS 2019 为 64 位构建expat库,以与 log4cxx 集成。从这里下载了外籍人士。这里提到的步骤只是linux。我尝试按照包装中提到的步骤进行操作。但是 cmake 失败了。64 位没有预构建的库。下面是cmake的输出
c:\> cmake .. -G "Visual Studio 16 2019" && msbuild /m expat.sln
-- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.16299.
-- The C compiler identification is MSVC 19.24.28316.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Looking for dlfcn.h
-- Looking for dlfcn.h - not found
-- Looking for fcntl.h
-- Looking for fcntl.h - found
-- Looking for inttypes.h
-- Looking for inttypes.h - found
-- Looking for memory.h
-- Looking for memory.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stdlib.h
-- Looking for stdlib.h - found
-- Looking for strings.h
-- Looking for strings.h - not found
-- Looking for string.h
-- Looking for string.h - found
-- Looking for sys/stat.h
-- Looking for sys/stat.h - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for unistd.h
-- Looking for unistd.h - not found
-- Looking for getpagesize
-- Looking for getpagesize - not found
-- Looking for mmap
-- Looking for mmap - not found
-- Looking for getrandom
-- Looking for getrandom - not found
-- Looking for arc4random_buf
-- Looking for arc4random_buf - not found
-- Looking for arc4random
-- Looking for arc4random - not found
-- Looking for 4 include files stdlib.h, ..., float.h
-- Looking for 4 include files stdlib.h, ..., float.h - found
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- Looking for off_t
-- Looking for off_t - not found
-- Looking for size_t
-- Looking for size_t - not found
-- Performing Test HAVE_SYSCALL_GETRANDOM
-- Performing Test HAVE_SYSCALL_GETRANDOM - Failed
-- Performing Test FLAG_NO_STRICT_ALIASING
-- Performing Test FLAG_NO_STRICT_ALIASING - Failed
-- Performing Test FLAG_VISIBILITY
-- Performing Test FLAG_VISIBILITY - Failed
-- The CXX compiler identification is MSVC 19.24.28316.0
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error: File C:/Program Files (x86)/Expat 2.2.9/Source/Changes does not exist.
CMake Error at CMakeLists.txt:478 (configure_file):
configure_file Problem configuring file
-- ===========================================================================
-- Configuration
-- Prefix ..................... C:/Program Files (x86)/expat
-- Build type .................
-- Shared libraries ........... ON
-- Static CRT ................. OFF
-- Character type ............. char (UTF-8)
-- Binary postfix .............
-- Build documentation ........ OFF
-- Build examples ............. ON
-- Build fuzzers .............. OFF
-- Build tests ................ ON
-- Build tools (xmlwf) ........ ON
-- Install files .............. ON
-- Features
-- // Advanced options, changes not advised
-- Attributes info .......... OFF
-- Context bytes ............ 1024
-- DTD support .............. ON
-- Large size ............... OFF
-- Minimum size ............. OFF
-- Namespace support ........ ON
-- Entropy sources
-- rand_s ................... ON
-- ===========================================================================
-- Configuring incomplete, errors occurred!
See also "C:/Program Files (x86)/Expat 2.2.9/Source/build/CMakeFiles/CMakeOutput.log".
See also "C:/Program Files (x86)/Expat 2.2.9/Source/build/CMakeFiles/CMakeError.log".
寻找解决问题的建议/帮助。
问候, 毗湿奴