See Windows GCC LTO build logs at https://github.com/zufuliu/notepad2/runs/2729178653?check_suite_focus=true#step:5:200
../../scintilla/include/ScintillaMessages.h:16:12: warning: type 'Scintilla::Message' violates the C++ One Definition Rule [-Wodr]
16 | enum class Message {
| ^
../../scintilla/include/ScintillaMessages.h:16:12: note: an enum with different value name is defined in another translation unit
16 | enum class Message {
| ^
../../scintilla/include/ScintillaMessages.h:242:2: note: name 'FindTextW' differs from name 'FindText' defined in another translation unit
242 | FindText = 2150,
| ^
../../scintilla/include/ScintillaMessages.h:242:2: note: mismatching definition
242 | FindText = 2150,
| ^
This can be fixed by undef the win32 FindText macro before include Scintilla headers. Other compiler (MSVC, clang-cl, mingw clang) does not has the warning.
It appears it can also be avoided by including windows.h with WIN32_LEAN_AND_MEAN avoiding commdlg.h which contains FindText.
Yes, define WIN32_LEAN_AND_MEAN fixed the warning.
Committed fix as [8b4634].
WIN32_LEAN_AND_MEAN can potentially avoid more issues.
Related
Commit: [8b4634]
Committed fix as [8b4634].
WIN32_LEAN_AND_MEAN can potentially avoid more issues.
Related
Commit: [8b4634]