2011-09-14 14 views
1

プロジェクトに独自の名前空間があるので、gtkmmを使ってGUIを追加したいと思います。コンパイル時の問題sigC++/gtkmm自身の名前空間

void Config::connect_signals() 
{ 
    m_notebook.signal_switch_page().connect(sigc::mem_fun(*this,&Config::on_notebook_switch_page)); 
    m_button_save.signal_clicked().connect(sigc::mem_fun(*this,&Config::on_button_clicked_save)); 
    m_button_close.signal_clicked().connect(sigc::mem_fun(*this,&Config::on_button_clicked_close)); 
} 

私たちは、その後、pkg-config --cflags gtkmm-2.4pkg-config --libs gtkmm-2.4を使用してConfig.cppをコンパイルしている:それはすべて作品

// in a header file: 
namespace project 
{ 
    // namespace "gui" is declared elsewhere  
    class gui::Config : Gtk::Window 
    { 
     protected: 
      Config(); 

     private: 
      // various Gtk::Widget objects 

      void connect_signals(); 

    }; 
} 

まで、私は、このメソッドを実装してみてください。私たちは問題が本当にライブラリSIGCに関連している場合はわからない++またはそれだけで、名前空間の問題だ場合

In file included from /usr/include/sigc++-2.0/sigc++/signal_base.h:29:0, 
     from /usr/include/sigc++-2.0/sigc++/signal.h:8, 
     from /usr/include/sigc++-2.0/sigc++/sigc++.h:23, 
     from /usr/include/glibmm-2.4/glibmm/signalproxy.h:13, 
     from /usr/include/glibmm-2.4/glibmm/objectbase.h:23, 
     from /usr/include/glibmm-2.4/glibmm/wrap.h:26, 
     from /usr/include/glibmm-2.4/glibmm/containerhandle_shared.h:25, 
     from /usr/include/glibmm-2.4/glibmm/arrayhandle.h:23, 
     from /usr/include/glibmm-2.4/glibmm.h:83, 
     from /usr/include/gtkmm-2.4/gtkmm.h:87, 
     from include/libproject.h:12, 
     from include/gui/Config.h:4, 
     from src/gui/Config.cpp:1: 
/usr/include/sigc++-2.0/sigc++/type_traits.h: In instantiation of ‘const bool sigc::is_base_and_derived<sigc::trackable, project::gui::Config>::value’: 
/usr/include/sigc++-2.0/sigc++/functors/mem_fun.h:1922:26: instantiated from ‘sigc::bound_mem_functor2<void, project::gui::Config, _GtkNotebookPage*, unsigned int>’ 
src/gui/Config.cpp:70:94: instantiated from here 
/usr/include/sigc++-2.0/sigc++/type_traits.h:132:16: error: ‘sigc::trackable’ is an inaccessible base of ‘project::gui::Config’ 
In file included from /usr/include/sigc++-2.0/sigc++/adaptors/adaptor_trait.h:9:0, 
     from /usr/include/sigc++-2.0/sigc++/functors/slot.h:7, 
     from /usr/include/sigc++-2.0/sigc++/signal_base.h:31, 
     from /usr/include/sigc++-2.0/sigc++/signal.h:8, 
     from /usr/include/sigc++-2.0/sigc++/sigc++.h:23, 
     from /usr/include/glibmm-2.4/glibmm/signalproxy.h:13, 
     from /usr/include/glibmm-2.4/glibmm/objectbase.h:23, 
     from /usr/include/glibmm-2.4/glibmm/wrap.h:26, 
     from /usr/include/glibmm-2.4/glibmm/containerhandle_shared.h:25, 
     from /usr/include/glibmm-2.4/glibmm/arrayhandle.h:23, 
     from /usr/include/glibmm-2.4/glibmm.h:83, 
     from /usr/include/gtkmm-2.4/gtkmm.h:87, 
     from include/libproject.h:12, 
     from include/gui/Config.h:4, 
     from src/gui/Config.cpp:1: 
/usr/include/sigc++-2.0/sigc++/functors/mem_fun.h: In instantiation of ‘sigc::bound_mem_functor2<void, project::gui::Config, _GtkNotebookPage*, unsigned int>’: 
src/gui/Config.cpp:70:94: instantiated from here 
/usr/include/sigc++-2.0/sigc++/functors/mem_fun.h:1922:26: error: ‘sigc::is_base_and_derived<sigc::trackable, project::gui::Config>::value’ is not a valid template argument for type ‘bool’ because it is a non-constant expression 
/usr/include/sigc++-2.0/sigc++/functors/mem_fun.h: In instantiation of ‘sigc::bound_mem_functor0<void, project::gui::Config>’: 
src/gui/Config.cpp:72:95: instantiated from here 
/usr/include/sigc++-2.0/sigc++/functors/mem_fun.h:1792:26: error: ‘sigc::is_base_and_derived<sigc::trackable, project::gui::Config>::value’ is not a valid template argument for type ‘bool’ because it is a non-constant expression 
/usr/include/sigc++-2.0/sigc++/functors/mem_fun.h: In constructor ‘sigc::bound_mem_functor2<T_return, T_obj, T_arg1, T_arg2>::bound_mem_functor2(T_obj&, sigc::bound_mem_functor2<T_return, T_obj, T_arg1, T_arg2>::function_type) [with T_return = void, T_obj = project::gui::Config, T_arg1 = _GtkNotebookPage*, T_arg2 = unsigned int, sigc::bound_mem_functor2<T_return, T_obj, T_arg1, T_arg2>::function_type = void (project::gui::Config::*)(_GtkNotebookPage*, unsigned int)]’: 
/usr/include/sigc++-2.0/sigc++/functors/mem_fun.h:5501:77: instantiated from ‘sigc::bound_mem_functor2<T_return, T_obj, T_arg1, T_arg2> sigc::mem_fun(T_obj&, T_return (T_obj2::*)(T_arg1, T_arg2)) [with T_arg1 = _GtkNotebookPage*, T_arg2 = unsigned int, T_return = void, T_obj = project::gui::Config, T_obj2 = project::gui::Config]’ 
src/gui/Config.cpp:70:94: instantiated from here 
/usr/include/sigc++-2.0/sigc++/functors/mem_fun.h:1908:18: error: using invalid field ‘sigc::bound_mem_functor2<T_return, T_obj, T_arg1, T_arg2>::obj_’ 
/usr/include/sigc++-2.0/sigc++/functors/mem_fun.h: In constructor ‘sigc::bound_mem_functor0<T_return, T_obj>::bound_mem_functor0(T_obj&, sigc::bound_mem_functor0<T_return, T_obj>::function_type) [with T_return = void, T_obj = project::gui::Config, sigc::bound_mem_functor0<T_return, T_obj>::function_type = void (project::gui::Config::*)()]’: 
/usr/include/sigc++-2.0/sigc++/functors/mem_fun.h:5453:61: instantiated from ‘sigc::bound_mem_functor0<T_return, T_obj> sigc::mem_fun(T_obj&, T_return (T_obj2::*)()) [with T_return = void, T_obj = project::gui::Config, T_obj2 = project::gui::Config]’ 
src/gui/Config.cpp:72:95: instantiated from here 
/usr/include/sigc++-2.0/sigc++/functors/mem_fun.h:1780:18: error: using invalid field ‘sigc::bound_mem_functor0<T_return, T_obj>::obj_’ 
/usr/include/sigc++-2.0/sigc++/functors/mem_fun.h: In function ‘void sigc::visit_each(const T_action&, const sigc::bound_mem_functor2<T_return, T_obj, T_arg1, T_arg2>&) [with T_action = sigc::internal::limit_derived_target<sigc::trackable*, sigc::internal::slot_do_bind>, T_return = void, T_obj = project::gui::Config, T_arg1 = _GtkNotebookPage*, T_arg2 = unsigned int]’: 
/usr/include/sigc++-2.0/sigc++/adaptors/adaptor_trait.h:267:3: instantiated from ‘void sigc::visit_each(const T_action&, const sigc::adaptor_functor<T_functor>&) [with T_action = sigc::internal::limit_derived_target<sigc::trackable*, sigc::internal::slot_do_bind>, T_functor = sigc::bound_mem_functor2<void, project::gui::Config, _GtkNotebookPage*, unsigned int>]’ 
/usr/include/sigc++-2.0/sigc++/visit_each.h:170:3: instantiated from ‘void sigc::visit_each_type(const T_action&, const T_functor&) [with T_type = sigc::trackable*, T_action = sigc::internal::slot_do_bind, T_functor = sigc::adaptor_functor<sigc::bound_mem_functor2<void, project::gui::Config, _GtkNotebookPage*, unsigned int> >]’ 
/usr/include/sigc++-2.0/sigc++/functors/slot.h:39:7: instantiated from ‘sigc::internal::typed_slot_rep<T_functor>::typed_slot_rep(const T_functor&) [with T_functor = sigc::bound_mem_functor2<void, project::gui::Config, _GtkNotebookPage*, unsigned int>]’ 
/usr/include/sigc++-2.0/sigc++/functors/slot.h:604:65: instantiated from ‘sigc::slot2<T_return, T_arg1, T_arg2>::slot2(const T_functor&) [with T_functor = sigc::bound_mem_functor2<void, project::gui::Config, _GtkNotebookPage*, unsigned int>, T_return = void, T_arg1 = _GtkNotebookPage*, T_arg2 = unsigned int]’ 
/usr/include/sigc++-2.0/sigc++/functors/slot.h:1184:26: instantiated from ‘sigc::slot<T_return, T_arg1, T_arg2, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil>::slot(const T_functor&) [with T_functor = sigc::bound_mem_functor2<void, project::gui::Config, _GtkNotebookPage*, unsigned int>, T_return = void, T_arg1 = _GtkNotebookPage*, T_arg2 = unsigned int]’ 
src/gui/Config.cpp:70:95: instantiated from here 
/usr/include/sigc++-2.0/sigc++/functors/mem_fun.h:1936:3: error: ‘const class sigc::bound_mem_functor2<void, project::gui::Config, _GtkNotebookPage*, unsigned int>’ has no member named ‘obj_’ 
/usr/include/sigc++-2.0/sigc++/functors/mem_fun.h: In member function ‘T_return sigc::bound_mem_functor2<T_return, T_obj, T_arg1, T_arg2>::operator()(typename sigc::type_trait<T_arg3>::take, typename sigc::type_trait<T_arg4>::take) const [with T_return = void, T_obj = project::gui::Config, T_arg1 = _GtkNotebookPage*, T_arg2 = unsigned int, typename sigc::type_trait<T_arg3>::take = _GtkNotebookPage* const&, typename sigc::type_trait<T_arg4>::take = const unsigned int&]’: 
/usr/include/sigc++-2.0/sigc++/adaptors/adaptor_trait.h:103:39: instantiated from ‘typename sigc::adaptor_functor<T_functor>::deduce_result_type<T_arg1, T_arg2>::type sigc::adaptor_functor<T_functor>::operator()(T_arg1, T_arg2) const [with T_arg1 = _GtkNotebookPage* const&, T_arg2 = const unsigned int&, T_functor = sigc::bound_mem_functor2<void, project::gui::Config, _GtkNotebookPage*, unsigned int>, typename sigc::adaptor_functor<T_functor>::deduce_result_type<T_arg1, T_arg2>::type = void]’ 
/usr/include/sigc++-2.0/sigc++/functors/slot.h:173:25: instantiated from ‘static T_return sigc::internal::slot_call2<T_functor, T_return, T_arg1, T_arg2>::call_it(sigc::internal::slot_rep*, typename sigc::type_trait<T_arg3>::take, typename sigc::type_trait<T_arg4>::take) [with T_functor = sigc::bound_mem_functor2<void, project::gui::Config, _GtkNotebookPage*, unsigned int>, T_return = void, T_arg1 = _GtkNotebookPage*, T_arg2 = unsigned int, typename sigc::type_trait<T_arg3>::take = _GtkNotebookPage* const&, typename sigc::type_trait<T_arg4>::take = const unsigned int&]’ 
/usr/include/sigc++-2.0/sigc++/functors/slot.h:180:45: instantiated from ‘static void* (* sigc::internal::slot_call2<T_functor, T_return, T_arg1, T_arg2>::address())(void*) [with T_functor = sigc::bound_mem_functor2<void, project::gui::Config, _GtkNotebookPage*, unsigned int>, T_return = void, T_arg1 = _GtkNotebookPage*, T_arg2 = unsigned int, void* (*)(void*) = void* (*)(void*)]’ 
/usr/include/sigc++-2.0/sigc++/functors/slot.h:607:7: instantiated from ‘sigc::slot2<T_return, T_arg1, T_arg2>::slot2(const T_functor&) [with T_functor = sigc::bound_mem_functor2<void, project::gui::Config, _GtkNotebookPage*, unsigned int>, T_return = void, T_arg1 = _GtkNotebookPage*, T_arg2 = unsigned int]’ 
/usr/include/sigc++-2.0/sigc++/functors/slot.h:1184:26: instantiated from ‘sigc::slot<T_return, T_arg1, T_arg2, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil>::slot(const T_functor&) [with T_functor = sigc::bound_mem_functor2<void, project::gui::Config, _GtkNotebookPage*, unsigned int>, T_return = void, T_arg1 = _GtkNotebookPage*, T_arg2 = unsigned int]’ 
src/gui/Config.cpp:70:95: instantiated from here 
/usr/include/sigc++-2.0/sigc++/functors/mem_fun.h:1917:61: error: using invalid field ‘sigc::bound_mem_functor2<T_return, T_obj, T_arg1, T_arg2>::obj_’ 
/usr/include/sigc++-2.0/sigc++/functors/mem_fun.h:1917:61: error: return-statement with a value, in function returning 'void' 
/usr/include/sigc++-2.0/sigc++/functors/mem_fun.h: In function ‘void sigc::visit_each(const T_action&, const sigc::bound_mem_functor0<T_return, T_obj>&) [with T_action = sigc::internal::limit_derived_target<sigc::trackable*, sigc::internal::slot_do_bind>, T_return = void, T_obj = project::gui::Config]’: 
/usr/include/sigc++-2.0/sigc++/adaptors/adaptor_trait.h:267:3: instantiated from ‘void sigc::visit_each(const T_action&, const sigc::adaptor_functor<T_functor>&) [with T_action = sigc::internal::limit_derived_target<sigc::trackable*, sigc::internal::slot_do_bind>, T_functor = sigc::bound_mem_functor0<void, project::gui::Config>]’ 
/usr/include/sigc++-2.0/sigc++/visit_each.h:170:3: instantiated from ‘void sigc::visit_each_type(const T_action&, const T_functor&) [with T_type = sigc::trackable*, T_action = sigc::internal::slot_do_bind, T_functor = sigc::adaptor_functor<sigc::bound_mem_functor0<void, project::gui::Config> >]’ 
/usr/include/sigc++-2.0/sigc++/functors/slot.h:39:7: instantiated from ‘sigc::internal::typed_slot_rep<T_functor>::typed_slot_rep(const T_functor&) [with T_functor = sigc::bound_mem_functor0<void, project::gui::Config>]’ 
/usr/include/sigc++-2.0/sigc++/functors/slot.h:451:65: instantiated from ‘sigc::slot0<T_return>::slot0(const T_functor&) [with T_functor = sigc::bound_mem_functor0<void, project::gui::Config>, T_return = void]’ 
/usr/include/sigc++-2.0/sigc++/functors/slot.h:1130:26: instantiated from ‘sigc::slot<T_return, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil>::slot(const T_functor&) [with T_functor = sigc::bound_mem_functor0<void, project::gui::Config>, T_return = void]’ 
src/gui/Config.cpp:72:96: instantiated from here 
/usr/include/sigc++-2.0/sigc++/functors/mem_fun.h:1806:3: error: ‘const class sigc::bound_mem_functor0<void, project::gui::Config>’ has no member named ‘obj_’ 
/usr/include/sigc++-2.0/sigc++/functors/mem_fun.h: In member function ‘T_return sigc::bound_mem_functor0<T_return, T_obj>::operator()() const [with T_return = void, T_obj = project::gui::Config]’: 
/usr/include/sigc++-2.0/sigc++/adaptors/adaptor_trait.h:251:21: instantiated from ‘sigc::adaptor_functor<T_functor>::result_type sigc::adaptor_functor<T_functor>::operator()() const [with T_functor = sigc::bound_mem_functor0<void, project::gui::Config>, sigc::adaptor_functor<T_functor>::result_type = void]’ 
/usr/include/sigc++-2.0/sigc++/functors/slot.h:103:36: instantiated from ‘static T_return sigc::internal::slot_call0<T_functor, T_return>::call_it(sigc::internal::slot_rep*) [with T_functor = sigc::bound_mem_functor0<void, project::gui::Config>, T_return = void]’ 
/usr/include/sigc++-2.0/sigc++/functors/slot.h:110:45: instantiated from ‘static void* (* sigc::internal::slot_call0<T_functor, T_return>::address())(void*) [with T_functor = sigc::bound_mem_functor0<void, project::gui::Config>, T_return = void, void* (*)(void*) = void* (*)(void*)]’ 
/usr/include/sigc++-2.0/sigc++/functors/slot.h:454:7: instantiated from ‘sigc::slot0<T_return>::slot0(const T_functor&) [with T_functor = sigc::bound_mem_functor0<void, project::gui::Config>, T_return = void]’ 
/usr/include/sigc++-2.0/sigc++/functors/slot.h:1130:26: instantiated from ‘sigc::slot<T_return, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil>::slot(const T_functor&) [with T_functor = sigc::bound_mem_functor0<void, project::gui::Config>, T_return = void]’ 
src/gui/Config.cpp:72:96: instantiated from here 
/usr/include/sigc++-2.0/sigc++/functors/mem_fun.h:1787:49: error: using invalid field ‘sigc::bound_mem_functor0<T_return, T_obj>::obj_’ 
/usr/include/sigc++-2.0/sigc++/functors/mem_fun.h:1787:49: error: return-statement with a value, in function returning 'void' 
/usr/include/sigc++-2.0/sigc++/functors/mem_fun.h: In function ‘void sigc::visit_each(const T_action&, const sigc::bound_mem_functor2<T_return, T_obj, T_arg1, T_arg2>&) [with T_action = sigc::internal::limit_derived_target<sigc::trackable*, sigc::internal::slot_do_unbind>, T_return = void, T_obj = project::gui::Config, T_arg1 = _GtkNotebookPage*, T_arg2 = unsigned int]’: 
/usr/include/sigc++-2.0/sigc++/adaptors/adaptor_trait.h:267:3: instantiated from ‘void sigc::visit_each(const T_action&, const sigc::adaptor_functor<T_functor>&) [with T_action = sigc::internal::limit_derived_target<sigc::trackable*, sigc::internal::slot_do_unbind>, T_functor = sigc::bound_mem_functor2<void, project::gui::Config, _GtkNotebookPage*, unsigned int>]’ 
/usr/include/sigc++-2.0/sigc++/visit_each.h:170:3: instantiated from ‘void sigc::visit_each_type(const T_action&, const T_functor&) [with T_type = sigc::trackable*, T_action = sigc::internal::slot_do_unbind, T_functor = sigc::adaptor_functor<sigc::bound_mem_functor2<void, project::gui::Config, _GtkNotebookPage*, unsigned int> >]’ 
/usr/include/sigc++-2.0/sigc++/functors/slot.h:60:7: instantiated from ‘static void* sigc::internal::typed_slot_rep<T_functor>::destroy(void*) [with T_functor = sigc::bound_mem_functor2<void, project::gui::Config, _GtkNotebookPage*, unsigned int>]’ 
/usr/include/sigc++-2.0/sigc++/functors/slot.h:38:52: instantiated from ‘sigc::internal::typed_slot_rep<T_functor>::typed_slot_rep(const T_functor&) [with T_functor = sigc::bound_mem_functor2<void, project::gui::Config, _GtkNotebookPage*, unsigned int>]’ 
/usr/include/sigc++-2.0/sigc++/functors/slot.h:604:65: instantiated from ‘sigc::slot2<T_return, T_arg1, T_arg2>::slot2(const T_functor&) [with T_functor = sigc::bound_mem_functor2<void, project::gui::Config, _GtkNotebookPage*, unsigned int>, T_return = void, T_arg1 = _GtkNotebookPage*, T_arg2 = unsigned int]’ 
/usr/include/sigc++-2.0/sigc++/functors/slot.h:1184:26: instantiated from ‘sigc::slot<T_return, T_arg1, T_arg2, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil>::slot(const T_functor&) [with T_functor = sigc::bound_mem_functor2<void, project::gui::Config, _GtkNotebookPage*, unsigned int>, T_return = void, T_arg1 = _GtkNotebookPage*, T_arg2 = unsigned int]’ 
src/gui/Config.cpp:70:95: instantiated from here 
/usr/include/sigc++-2.0/sigc++/functors/mem_fun.h:1936:3: error: ‘const class sigc::bound_mem_functor2<void, project::gui::Config, _GtkNotebookPage*, unsigned int>’ has no member named ‘obj_’ 
/usr/include/sigc++-2.0/sigc++/functors/mem_fun.h: In function ‘void sigc::visit_each(const T_action&, const sigc::bound_mem_functor0<T_return, T_obj>&) [with T_action = sigc::internal::limit_derived_target<sigc::trackable*, sigc::internal::slot_do_unbind>, T_return = void, T_obj = project::gui::Config]’: 
/usr/include/sigc++-2.0/sigc++/adaptors/adaptor_trait.h:267:3: instantiated from ‘void sigc::visit_each(const T_action&, const sigc::adaptor_functor<T_functor>&) [with T_action = sigc::internal::limit_derived_target<sigc::trackable*, sigc::internal::slot_do_unbind>, T_functor = sigc::bound_mem_functor0<void, project::gui::Config>]’ 
/usr/include/sigc++-2.0/sigc++/visit_each.h:170:3: instantiated from ‘void sigc::visit_each_type(const T_action&, const T_functor&) [with T_type = sigc::trackable*, T_action = sigc::internal::slot_do_unbind, T_functor = sigc::adaptor_functor<sigc::bound_mem_functor0<void, project::gui::Config> >]’ 
/usr/include/sigc++-2.0/sigc++/functors/slot.h:60:7: instantiated from ‘static void* sigc::internal::typed_slot_rep<T_functor>::destroy(void*) [with T_functor = sigc::bound_mem_functor0<void, project::gui::Config>]’ 
/usr/include/sigc++-2.0/sigc++/functors/slot.h:38:52: instantiated from ‘sigc::internal::typed_slot_rep<T_functor>::typed_slot_rep(const T_functor&) [with T_functor = sigc::bound_mem_functor0<void, project::gui::Config>]’ 
/usr/include/sigc++-2.0/sigc++/functors/slot.h:451:65: instantiated from ‘sigc::slot0<T_return>::slot0(const T_functor&) [with T_functor = sigc::bound_mem_functor0<void, project::gui::Config>, T_return = void]’ 
/usr/include/sigc++-2.0/sigc++/functors/slot.h:1130:26: instantiated from ‘sigc::slot<T_return, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil>::slot(const T_functor&) [with T_functor = sigc::bound_mem_functor0<void, project::gui::Config>, T_return = void]’ 
src/gui/Config.cpp:72:96: instantiated from here 
/usr/include/sigc++-2.0/sigc++/functors/mem_fun.h:1806:3: error: ‘const class sigc::bound_mem_functor0<void, project::gui::Config>’ has no member named ‘obj_’ 
make: *** [src/gui/Config.o] Error 1 

コンパイラは、最終的には、次のメッセージをスローします。 別のファイルに名前空間のない同じファイルをコンパイルすると、うまくいきました。

任意のアイデアが高く評価され、よろしく

答えて

2

は、あなたのクラスは、個人の信号は、これらのインタフェースに接続しようとするが、彼らしているように見えます

class gui::Config : public Gtk::Window 

Gtk::Window

class gui::Config : Gtk::Window 

から継承していますアクセスできない

+0

+1:受け入れる:作業ファイルを再分析した後、私は何かが欠けているのを見ました。あなたがそれを覚えているならば、それは簡単で論理的です。ありがとう! – Atmocreations

0

定義が提供されているファイルに3つの名前空間をすべてインポートする必要があります。

using namespace project; 
using namespace gui; 
using namespace gtk; 

void Config::connect_signals() 
{ 
    // ... 
} 

しかし、私は見project, gui名前空間は冗長です。既にConfigがネームスペースprojectにあります。私はgui名前空間がどこに宣言されているというあなたのコメントを理解していません。これで十分です -

namespace project 
{ 
    class Config : Gtk::Window // The class being inherited is from a different namespace 
    { 
     //... 
+1

a) 'namespace gtk'を使って宣言するのは私の意図ではありません。とにかく、Gtkでなければならないと思いますが、これは同じではありません(大文字と小文字の区別)。 b)AFAIKでは、 'namespace'がまだ存在しない場合、' class namespace :: Classname {}; 'を使ってクラスを作成することはできません。とにかくありがとう :) – Atmocreations

関連する問題