我一直在尝试从MAME项目中编译部分代码,我遇到了编译本节的问题attotime.h:
// core components of the attotime structure
typedef s64 attoseconds_t;
typedef s32 seconds_t;
// core definitions
constexpr attoseconds_t ATTOSECONDS_PER_SECOND_SQRT = 1'000'000'000;
constexpr attoseconds_t ATTOSECONDS_PER_SECOND = ATTOSECONDS_PER_SECOND_SQRT * ATTOSECONDS_PER_SECOND_SQRT;
constexpr attoseconds_t ATTOSECONDS_PER_MILLISECOND = ATTOSECONDS_PER_SECOND / 1'000;
constexpr attoseconds_t ATTOSECONDS_PER_MICROSECOND = ATTOSECONDS_PER_SECOND / 1'000'000;
constexpr attoseconds_t ATTOSECONDS_PER_NANOSECOND = ATTOSECONDS_PER_SECOND / 1'000'000'000;
constexpr seconds_t ATTOTIME_MAX_SECONDS = 1'000'000'000;
Run Code Online (Sandbox Code Playgroud)
这给出了错误:
In file included from ~/git/mame/src/emu/emu.h:32,
from main.cpp:1:
~/git/mame/src/emu/attotime.h:54:56: warning: multi-character character constant [-Wmultichar]
constexpr attoseconds_t ATTOSECONDS_PER_SECOND_SQRT = 1'000'000'000;
^~~~~
~/git/mame/src/emu/attotime.h:54:64: warning: missing …Run Code Online (Sandbox Code Playgroud)