我正在尝试使用scintilla从sci-notify信号中获取通知代码,但我得到了段错误。这是我的代码:
void scinot(GtkWidget *s, SCNotification *notify, gpointer u)
{
NotifyHeader nmhdr = notify->nmhdr;
std::cout << nmhdr.code << std::endl;
}
答案 0 :(得分:0)
您的功能签名错误。根据{{3}},它应该如下:
handler(GtkWidget *, gint, SCNotification *notification, gpointer userData)
(你错过了gint),制作你的功能:
void scinot(GtkWidget *s, gint i,SCNotification *notify, gpointer u)
{
NotifyHeader nmhdr = notify->nmhdr;
std::cout << nmhdr.code << std::endl;
}