LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 659|回复: 1

编译libgtkmm2.0的程序通不过

[复制链接]
发表于 2003-8-8 00:21:31 | 显示全部楼层 |阅读模式
前面下载了一个linq编译没有通过,以为是linq的问题
今天按照它网页上的文档说明,复制了它的代码:

  1. //simple.cc
  2. #include <gtkmm.h>

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

  6.     Gtk::Window window;

  7.     Gtk::Main::run(window);
  8.    
  9.     return 0;
  10. }
复制代码


使用它说明的编译方法:
g++ simple.cc -o simple `pkg-config gtkmm-2.0 --cflags --libs`
结果出现下面的错误:
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

记得当时编译linq的时候也是这个错误。
怎么办?
 楼主| 发表于 2003-8-8 17:10:29 | 显示全部楼层
解决了,用g++-3.2,就可以了,我前面用的是3.3
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表