Skip to content

Windows MSVC build failed on non-unicode system #443

@xiaoge136

Description

@xiaoge136

Description

warning C4819 as error, and stop build

  • During build

Environment

  • OS: [Windows 10, 64-bit]
  • Compiler: [MSVC 2017]
  • CMake version: [3.18.0]

Steps To Reproduce
cmake -B build -DSENTRY_BACKEND=crashpad
cmake --build build --parallel
cmake --install build --prefix install --config Debug

Log output
-- Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.18363.
-- SENTRY_TRANSPORT=winhttp
-- SENTRY_BACKEND=crashpad
-- SENTRY_LIBRARY_TYPE=SHARED
-- Configuring done
-- Generating done
-- Build files have been written to: .../third_party/sentry/build
用于 .NET Framework 的 Microsoft (R) 生成引擎版本 15.9.21+g9802d43bc3
版权所有(C) Microsoft Corporation。保留所有权利。

crashpad_zlib.vcxproj -> ...\third_party\sentry\build\crashpad_build\third_party\zlib\Debug\c
rashpad_zlib.lib
mini_chromium.vcxproj -> ...\third_party\sentry\build\crashpad_build\third_party\mini_chromiu
m\Debug\mini_chromium.lib
crashpad_tools.vcxproj -> ...\third_party\sentry\build\crashpad_build\tools\Debug\crashpad_to
ols.lib
crashpad_compat.vcxproj -> ...\third_party\sentry\build\crashpad_build\compat\Debug\crashpad_
compat.lib
crashpad_getopt.vcxproj -> ...\third_party\sentry\build\crashpad_build\third_party\getopt\Deb
ug\crashpad_getopt.lib
delimited_file_reader.cc
directory_reader_win.cc
file_helper.cc
file_io.cc
file_io_win.cc
file_reader.cc
file_seeker.cc
file_writer.cc
filesystem_win.cc
output_stream_file_writer.cc
scoped_remove_file.cc
string_file.cc
clock_win.cc
initialization_state_dcheck.cc
...\third_party\sentry\external\crashpad\util/misc/initialization_state_dcheck.h : error C2220:
警告被视为错误 - 没有生成“object”文件 [...\third_party\sentry\build\crashpad_build\util\crashpa
d_util.vcxpr
oj]
...\third_party\sentry\external\crashpad\util/misc/initialization_state_dcheck.h : warning C481
9: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 [...\third_party\sentry\build\crashpad_b
uild\util\crashpad_util.vcxproj]
solution
Edit this file ...\sentry\external\crashpad\CMakeLists.txt
and comment on this line $<$<COMPILE_LANGUAGE:C,CXX>:/WX>

However, this method requires changes to the sentry repository code, and it would be nice if you could do so without changing the sentry repository code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions