cmake .. -G“ Visual Studio 16 2019” && msbuild / m expat.sln-失败

我正在尝试使用VS 2019为64位构建 expat 库,以便与log4cxx集成。从here下载了该移民。 here中提到的步骤仅是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".

正在寻找解决问题的建议/帮助。

关于, Vishu

iCMS 回答:cmake .. -G“ Visual Studio 16 2019” && msbuild / m expat.sln-失败

这是issue #409 upstream。它已在 libexpat >=2.2.10 中修复。

本文链接:https://www.f2er.com/1931432.html

大家都在问