Mike Lischke:
> Well, it's actually about SCNotification which is in the Scintilla namespace if enabled and this file won't compile then. Currently we manually change this to Scintilla::SCNotification, but that's not how it should be.
Adding the ‘ namespace Scintilla { ‘ to the header leads to ambiguity errors.
From both Clang and g++:
clang++ -Wno-deprecated-register -pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/mirclient -I/usr/include/mircommon -I/usr/include/mircookie -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include --std=gnu++0x -DNDEBUG -Os -Wall -pedantic -fPIC -DGTK -DSCI_LEXER -DSCI_NAMESPACE -I ./../include -I ./../src -I ./../lexlib -c ScintillaGTK.cxx
ScintillaGTK.cxx:2921:9: error: call to 'scintilla_send_message' is ambiguous
return scintilla_send_message(sci, iMessage, wParam, lParam);
^~~~~~~~~~~~~~~~~~~~~~
./../include/ScintillaWidget.h:64:9: note: candidate function
sptr_t scintilla_send_message (ScintillaObject *sci,unsigned int iMessage, uptr_t wParam, sptr_t lParam);
^
ScintillaGTK.cxx:2915:8: note: candidate function
sptr_t scintilla_send_message(ScintillaObject *sci, unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
^
ScintillaGTK.cxx:2961:9: error: call to 'scintilla_get_type' is ambiguous
return scintilla_get_type();
^~~~~~~~~~~~~~~~~~
./../include/ScintillaWidget.h:61:8: note: candidate function
GType scintilla_get_type (void);
^
ScintillaGTK.cxx:2931:7: note: candidate function
GType scintilla_get_type() {
^
ScintillaGTK.cxx:3069:46: error: call to 'scintilla_get_type' is ambiguous
GtkWidget *widget = GTK_WIDGET(g_object_new(scintilla_get_type(), NULL));
^~~~~~~~~~~~~~~~~~
/usr/include/gtk-3.0/gtk/gtkwidget.h:58:61: note: expanded from macro 'GTK_WIDGET'
#define GTK_WIDGET(widget) (G_TYPE_CHECK_INSTANCE_CAST ((widget), GTK_TYPE_WIDGET, GtkWidget))
^~~~~~
/usr/include/glib-2.0/gobject/gtype.h:479:80: note: expanded from macro 'G_TYPE_CHECK_INSTANCE_CAST'
#define G_TYPE_CHECK_INSTANCE_CAST(instance, g_type, c_type) (_G_TYPE_CIC ((instance), (g_type), c_type))
^~~~~~~~
/usr/include/glib-2.0/gobject/gtype.h:2207:57: note: expanded from macro '_G_TYPE_CIC'
((ct*) g_type_check_instance_cast ((GTypeInstance*) ip, gt))
^~
./../include/ScintillaWidget.h:61:8: note: candidate function
GType scintilla_get_type (void);
^
ScintillaGTK.cxx:2931:7: note: candidate function
GType scintilla_get_type() {
^
ScintillaGTK.cxx:3076:9: error: call to 'scintilla_new' is ambiguous
return scintilla_new();
^~~~~~~~~~~~~
./../include/ScintillaWidget.h:62:12: note: candidate function
GtkWidget* scintilla_new (void);
^
ScintillaGTK.cxx:3068:12: note: candidate function
GtkWidget* scintilla_new() {
^
4 errors generated.
makefile:87: recipe for target 'ScintillaGTK.o' failed
g++ -pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/mirclient -I/usr/include/mircommon -I/usr/include/mircookie -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include --std=gnu++0x -DNDEBUG -Os -Wall -pedantic -fPIC -DGTK -DSCI_LEXER -DSCI_NAMESPACE -I ./../include -I ./../src -I ./../lexlib -c ScintillaGTK.cxx
ScintillaGTK.cxx: In function 'gintptr scintilla_object_send_message(Scintilla::ScintillaObject*, unsigned int, uptr_t, sptr_t)':
ScintillaGTK.cxx:2921:61: error: call of overloaded 'scintilla_send_message(Scintilla::ScintillaObject*&, unsigned int&, uptr_t&, sptr_t&)' is ambiguous
return scintilla_send_message(sci, iMessage, wParam, lParam);
^
ScintillaGTK.cxx:2915:8: note: candidate: sptr_t scintilla_send_message(Scintilla::ScintillaObject*, unsigned int, uptr_t, sptr_t)
sptr_t scintilla_send_message(ScintillaObject *sci, unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
^~~~~~~~~~~~~~~~~~~~~~
In file included from ScintillaGTK.cxx:34:0:
./../include/ScintillaWidget.h:64:9: note: candidate: sptr_t Scintilla::scintilla_send_message(Scintilla::ScintillaObject*, unsigned int, uptr_t, sptr_t)
sptr_t scintilla_send_message (ScintillaObject *sci,unsigned int iMessage, uptr_t wParam, sptr_t lParam);
^~~~~~~~~~~~~~~~~~~~~~
ScintillaGTK.cxx: In function 'GType scintilla_object_get_type()':
ScintillaGTK.cxx:2961:28: error: call of overloaded 'scintilla_get_type()' is ambiguous
return scintilla_get_type();
^
ScintillaGTK.cxx:2931:7: note: candidate: GType scintilla_get_type()
GType scintilla_get_type() {
^~~~~~~~~~~~~~~~~~
In file included from ScintillaGTK.cxx:34:0:
./../include/ScintillaWidget.h:61:8: note: candidate: GType Scintilla::scintilla_get_type()
GType scintilla_get_type (void);
^~~~~~~~~~~~~~~~~~
In file included from /usr/include/glib-2.0/gobject/gobject.h:24:0,
from /usr/include/glib-2.0/gobject/gbinding.h:29,
from /usr/include/glib-2.0/glib-object.h:23,
from /usr/include/glib-2.0/gio/gioenums.h:28,
from /usr/include/glib-2.0/gio/giotypes.h:28,
from /usr/include/glib-2.0/gio/gio.h:26,
from /usr/include/gtk-3.0/gdk/gdkapplaunchcontext.h:28,
from /usr/include/gtk-3.0/gdk/gdk.h:32,
from ScintillaGTK.cxx:22:
ScintillaGTK.cxx: In function 'GtkWidget* scintilla_new()':
ScintillaGTK.cxx:3069:65: error: call of overloaded 'scintilla_get_type()' is ambiguous
GtkWidget *widget = GTK_WIDGET(g_object_new(scintilla_get_type(), NULL));
^
/usr/include/glib-2.0/gobject/gtype.h:2207:57: note: in definition of macro '_G_TYPE_CIC'
((ct*) g_type_check_instance_cast ((GTypeInstance*) ip, gt))
^~
/usr/include/gtk-3.0/gtk/gtkwidget.h:58:32: note: in expansion of macro 'G_TYPE_CHECK_INSTANCE_CAST'
#define GTK_WIDGET(widget) (G_TYPE_CHECK_INSTANCE_CAST ((widget), GTK_TYPE_WIDGET, GtkWidget))
^~~~~~~~~~~~~~~~~~~~~~~~~~
ScintillaGTK.cxx:3069:22: note: in expansion of macro 'GTK_WIDGET'
GtkWidget *widget = GTK_WIDGET(g_object_new(scintilla_get_type(), NULL));
^~~~~~~~~~
ScintillaGTK.cxx:2931:7: note: candidate: GType scintilla_get_type()
GType scintilla_get_type() {
^~~~~~~~~~~~~~~~~~
In file included from ScintillaGTK.cxx:34:0:
./../include/ScintillaWidget.h:61:8: note: candidate: GType Scintilla::scintilla_get_type()
GType scintilla_get_type (void);
^~~~~~~~~~~~~~~~~~
ScintillaGTK.cxx: In function 'GtkWidget* scintilla_object_new()':
ScintillaGTK.cxx:3076:23: error: call of overloaded 'scintilla_new()' is ambiguous
return scintilla_new();
^
ScintillaGTK.cxx:3068:12: note: candidate: GtkWidget* scintilla_new()
GtkWidget* scintilla_new() {
^~~~~~~~~~~~~
In file included from ScintillaGTK.cxx:34:0:
./../include/ScintillaWidget.h:62:12: note: candidate: GtkWidget* Scintilla::scintilla_new()
GtkWidget* scintilla_new (void);
^~~~~~~~~~~~~
makefile:87: recipe for target 'ScintillaGTK.o' failed
make: *** [ScintillaGTK.o] Error 1
Neil