[gtkmm] help, I can't compile libgtkmm2.0 programs



wo copy the code from the tutorial http://www.gtkmm.org/gtkmm2/docs/tutorial/html/ch03.html :
#include <gtkmm.h>

int main(int argc, char *argv[])
{
    Gtk::Main kit(argc, argv);

    Gtk::Window window;

    Gtk::Main::run(window);

    return 0;
}
and i compiled it with command:
g++ simple.cc -o simple `pkg-config gtkmm-2.0 --cflags --libs`

It gave me the following error information:
In file included from /usr/include/gtkmm-2.0/glibmm/containerhandle_shared.h:34,
                 from /usr/include/gtkmm-2.0/glibmm/arrayhandle.h:24,
                 from /usr/include/gtkmm-2.0/glibmm.h:26,
                 from /usr/include/gtkmm-2.0/gtkmm.h:29,
                 from simple.cpp:1:
/usr/include/gtkmm-2.0/glibmm/ustring.h:532: error: `template<class In, class ValueType = typename std::iterator_traits<_Iterator>::value_type> struct
   Glib::ustring::SequenceToString' is private
/usr/include/gtkmm-2.0/glibmm/ustring.h:548: error: within this context
/usr/include/gtkmm-2.0/glibmm/ustring.h:532: error: `template<class In, class ValueType = typename std::iterator_traits<_Iterator>::value_type> struct
   Glib::ustring::SequenceToString' is private
/usr/include/gtkmm-2.0/glibmm/ustring.h:554: error: within this context
/usr/include/gtkmm-2.0/glibmm/ustring.h:532: error: `template<class In, class ValueType = typename std::iterator_traits<_Iterator>::value_type> struct
   Glib::ustring::SequenceToString' is private
/usr/include/gtkmm-2.0/glibmm/ustring.h:560: error: within this context
/usr/include/gtkmm-2.0/glibmm/ustring.h:532: error: `template<class In, class ValueType = typename std::iterator_traits<_Iterator>::value_type> struct
   Glib::ustring::SequenceToString' is private
/usr/include/gtkmm-2.0/glibmm/ustring.h:566: error: within this context

I've compiled some other programs wrriten with libgtkmm2.0, and the same error occurred. What should I do?

Thanks
Sincerely
Shixin Zeng




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]