我有一个不正确派生的Gtk :: Toolbar_Helpers :: ToggleElem类来自 gtkglextmm库。
是否有人熟悉这些GNOME课程?我无法找到最新版本的文档。
//
// C++ Interface: tooltogglebutton
//
// Description:
//
//
// Author: Karsten Bohlmann <aldaran@users.sourceforge.net>, (C) 2004
//
// Copyright: See COPYING file that comes with this distribution
//
//
#ifndef TOOLTOGGLEBUTTON_H
#define TOOLTOGGLEBUTTON_H
#include <gtkmm/toolbar.h>
/**
provides Gtk::toolbar togglebutton with extra access methods
@author Karsten Bohlmann
*/
class ToolToggleButton : public Gtk::Toolbar_Helpers::ToggleElem
{
public:
ToolToggleButton(const Glib::ustring& text,
const SigC::Slot0<void> & callback,
const Glib::ustring& tooltip_text = Glib::ustring(),
const Glib::ustring& tooltip_private_text = Glib::ustring());
~ToolToggleButton();
void setActive (bool isActive);
};
#endif
导致以下错误:
In file included from cellapp.h:27:0,
from cellapp.cpp:23:
tooltogglebutton.h:23:38: error: ‘Gtk::Toolbar_Helpers’ has not been declared
class ToolToggleButton : public Gtk::Toolbar_Helpers::ToggleElem::ToggleElem
^
tooltogglebutton.h:23:67: error: expected ‘{’ before ‘ToggleElem’
class ToolToggleButton : public Gtk::Toolbar_Helpers::ToggleElem::ToggleElem
^
tooltogglebutton.h:24:1: error: invalid type in declaration before ‘{’ token
{
^
tooltogglebutton.h:24:1: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default]
tooltogglebutton.h:25:1: error: expected primary-expression before ‘public’
public:
^
tooltogglebutton.h:25:1: error: expected ‘}’ before ‘public’
tooltogglebutton.h:25:1: error: expected ‘,’ or ‘;’ before ‘public’
tooltogglebutton.h:30:22: error: expected constructor, destructor, or type conversion before ‘;’ token
~ToolToggleButton();
^
tooltogglebutton.h:32:1: error: expected declaration before ‘}’ token
};
^
make[2]: *** [cellapp.o] Error 1
make[2]: Leaving directory `/home/dave/src/cellumat3d/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/dave/src/cellumat3d'
make: *** [all] Error 2