g++ --std=c++17 -DGTK -DPIXMAP_PATH=\"/app/share/pixmaps\" -DSYSCONF_PATH=\"/app/share/scite\" -DNDEBUG -I ./../../lexilla/include -I ./../../lexilla/access -I ./../../scintilla/include -I ./../src -I./../lua/src -Wall -pedantic -Wextra -Wno-misleading-indentation -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/cairo -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/atk-1.0 -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/at-spi2-atk/2.0 -I/usr/include/blkid -I/usr/include/at-spi-2.0 -I/usr/include/gio-unix-2.0 -I/usr/include/pixman-1 -I/usr/include/libmount -pthread -I/usr/include/fribidi -I/usr/include/libpng16 -O3 -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -c ./../src/StringList.cxx -o StringList.o
g++ --std=c++17 -DGTK -DPIXMAP_PATH=\"/app/share/pixmaps\" -DSYSCONF_PATH=\"/app/share/scite\" -DNDEBUG -I ./../../lexilla/include -I ./../../lexilla/access -I ./../../scintilla/include -I ./../src -I./../lua/src -Wall -pedantic -Wextra -Wno-misleading-indentation -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/cairo -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/atk-1.0 -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/at-spi2-atk/2.0 -I/usr/include/blkid -I/usr/include/at-spi-2.0 -I/usr/include/gio-unix-2.0 -I/usr/include/pixman-1 -I/usr/include/libmount -pthread -I/usr/include/fribidi -I/usr/include/libpng16 -O3 -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -c ./../src/StyleDefinition.cxx -o StyleDefinition.o
In file included from ./../src/StringList.cxx:22:
./../src/StringList.h:33:88: error: ‘ptrdiff_t’ has not been declared
33 | bool ignoreCase, const std::string &wordCharacters, ptrdiff_t wordIndex);
| ^~~~~~~~~
./../src/StringList.cxx:155:80: error: ‘ptrdiff_t’ has not been declared
155 | const char *wordStart, const std::string &wordCharacters, ptrdiff_t wordIndex, Compare comp) {
| ^~~~~~~~~
./../src/StringList.cxx:180:133: error: ‘ptrdiff_t’ has not been declared
180 | std::string StringList::GetNearestWord(const char *wordStart, size_t searchLen, bool ignoreCase, const std::string &wordCharacters, ptrdiff_t wordIndex) {
| ^~~~~~~~~
make: *** [makefile:108: StringList.o] Error 1
make: *** Waiting for unfinished jobs....
Error: module SciTE: Child process exited with code 2
It's
scite537.tgzversion 5.3.7 compile fails on flatpakFixed for me by:
GCC 12.3.1, Gentoo Linux
Last edit: Chris Mayo 2023-08-01
Reproducible.
Simply qualifying the type name with the
std::namespace appears to work as well.5.3.7 compiles OK with
g++ (GCC) 13.1.1 20230614 (Red Hat 13.1.1-4)on Fedora 38.Added equivalent
#include <cstddef>with [120792].ptrdiff_tis used in other files so its better not tostd::qualify in just one place.Related
Commit: [120792]