Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
3.2.5
-
None
-
None
Description
The following error happens when trying to build on Windows, using LLVM 17.0.6:
[287/299] Building RC object src\CMakeFiles\xerces-c.dir\Release\xercesc\util\version.rc.res FAILED: src/CMakeFiles/xerces-c.dir/Release/xercesc/util/version.rc.res "C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E cmake_llvm_rc D:\conan\p\b\xerce57c5f34a11450\b\build\src\xercesc\util\version.rc src\CMakeFiles\xerces-c.dir\Release\xercesc\util\version.rc.res.pp C:\PROGRA~1\LLVM\bin\clang-cl.exe -DHAVE_CONFIG_H=1 -DXERCES_BUILDING_LIBRARY=1 -DXERCES_DLL_NAME=\"xerces-c_3_2.dll\0\" -D_THREAD_SAFE=1 -Dxerces_c_EXPORTS -DCMAKE_INTDIR=\"Release\" -DRC_INVOKED -I D:\conan\p\b\xerce57c5f34a11450\b\build -I D:\conan\p\b\xerce57c5f34a11450\b\src\src -I D:\conan\p\b\xerce57c5f34a11450\b\build\src -DWIN32 -clang:-MD -clang:-MF -clang:src\CMakeFiles\xerces-c.dir\Release\xercesc\util\version.rc.res.d -E -- D:\conan\p\b\xerce57c5f34a11450\b\build\src\xercesc\util\version.rc ++ llvm-rc -DHAVE_CONFIG_H=1 -DXERCES_BUILDING_LIBRARY=1 -DXERCES_DLL_NAME=\"xerces-c_3_2.dll\0\" -D_THREAD_SAFE=1 -Dxerces_c_EXPORTS -DCMAKE_INTDIR=\"Release\" -I SOURCE_DIR -I D:\conan\p\b\xerce57c5f34a11450\b\build -I D:\conan\p\b\xerce57c5f34a11450\b\src\src -I D:\conan\p\b\xerce57c5f34a11450\b\build\src -DWIN32 -clang:-MD -clang:-MF -clang:src\CMakeFiles\xerces-c.dir\Release\xercesc\util\version.rc.res.d /fo src\CMakeFiles\xerces-c.dir\Release\xercesc\util\version.rc.res src\CMakeFiles\xerces-c.dir\Release\xercesc\util\version.rc.res.pp llvm-rc: Error in VERSIONINFO statement (ID 1): Non-ASCII 8-bit codepoint (´┐¢) can't be interpreted in the current codepage
This is caused by llvm-rc chokes on cp1252 · Issue #57367 · llvm/llvm-project (github.com)
And can be easily fixed by adding these lines to the CMakeLists.txt:
if (WIN32 AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang") set(CMAKE_RC_FLAGS="-C 1252") endif()