无法设置gtkmm

时间:2012-10-04 01:26:38

标签: c++ gtk installation gtkmm

我正在尝试在Windows 7系统上设置gtkmm。我已经安装了Glade 3.6.1和gtkmm开发环境2.22.0-2。

当我尝试运行下面的示例代码时,我无法编译并运行。

#include <gtkmm.h>

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

    Gtk::Window window;

    Gtk::Main::run(window);

    return 0;
}

编译日志:

  

编译器:默认编译器构建Makefile:   “C:\ Dev-Cpp \ Makefile.win”正在执行make ... make.exe -f   “C:\ Dev-Cpp \ Makefile.win”main.o g ++。exe -c main.cpp -o main.o   -I“C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include”-I“C:/ Dev-Cpp / include / c ++ / 3.4.2 / backward”-I“C:/ Dev- Cpp / include / c ++ / 3.4.2 / mingw32“-I”C:/ Dev-Cpp / include / c ++ / 3.4.2“-I”C:/ Dev-Cpp / include“-mms-bitfields -IC:/ GTK / include / gtkmm-2.4 -IC:/GTK/lib/gtkmm-2.4/include -IC:/GTK/include/atkmm-1.6 -IC:/GTK/include/giomm-2.4 -IC:/ GTK / lib / giomm-2.4 / include -IC:/GTK/include/pangomm-1.4 -IC:/GTK/lib/pangomm-1.4/include -IC:/GTK/include/gtk-2.0 -IC:/ GTK / include / gdkmm- 2.4 -IC:/GTK/lib/gdkmm-2.4/include -IC:/GTK/include/atk-1.0 -IC:/GTK/include/glibmm-2.4 -IC:/GTK/lib/glibmm-2.4/include - IC:/GTK/include/glib-2.0 -IC:/GTK/lib/glib-2.0/include -IC:/ GTK / include / sigc ++ - 2.0 -IC:/ GTK / lib / sigc ++ - 2.0 / include -IC: /GTK/include/cairomm-1.0 -IC:/GTK/lib/cairomm-1.0/include -IC:/GTK/include/pango-1.0 -IC:/ GTK / include / cairo -IC:/ GTK / include -IC :/ GTK / include / freetype2 -IC:/ GTK / include / libpng14 -IC:/GTK/lib/gtk-2.0/include -IC:/GTK/include/gdk-pixbuf-2.0 -IC:/ GTK / include / libglademm-2.4

     

包含来自的文件   C:/GTK/include/glibmm-2.4/glibmm/containerhandle_shared.h:24,                    来自C:/GTK/include/glibmm-2.4/glibmm/arrayhandle.h:23,                    来自C:/GTK/include/glibmm-2.4/glibmm.h:82,                    来自C:/GTK/include/gtkmm-2.4/gtkmm.h:87,                    来自main.cpp:1:C:/GTK/include/glibmm-2.4/glibmm/ustring.h:861:错误:ISO C ++禁止   声明wostringstream' with no type C:/GTK/include/glibmm-2.4/glibmm/ustring.h:861: error: expected;'   在“StreamType”之前C:/GTK/include/glibmm-2.4/glibmm/ustring.h:865:   错误:`StreamType'没有命名类型

     

C:/GTK/include/glibmm-2.4/glibmm/ustring.h:906:错误:预计   '&amp;'之前的构造函数,析构函数或类型转换代币   C:/GTK/include/glibmm-2.4/glibmm/ustring.h:906:错误:预期,' or ;'在'&amp;'之前令牌C:/GTK/include/glibmm-2.4/glibmm/ustring.h:912:   错误:'&amp;'之前的预期构造函数,析构函数或类型转换   令牌C:/GTK/include/glibmm-2.4/glibmm/ustring.h:912:错误:预期   ,' or;”在'&amp;'之前令牌

     

C:/GTK/include/glibmm-2.4/glibmm/ustring.h:在成员函数void Glib::ustring::FormatStream::stream(const T&)': C:/GTK/include/glibmm-2.4/glibmm/ustring.h:1057: error: stream_'中   未申报(首先使用此功能)   C:/GTK/include/glibmm-2.4/glibmm/ustring.h:1057:错误:(每个   对于每个函数,只报告一次未声明的标识符   出现在。)

     

C:/GTK/include/glibmm-2.4/glibmm/ustring.h:在成员函数void Glib::ustring::FormatStream::stream(const char*)': C:/GTK/include/glibmm-2.4/glibmm/ustring.h:1063: error: stream_'中   未申报(首先使用此功能)   C:/GTK/include/glibmm-2.4/glibmm/ustring.h:在成员函数void Glib::ustring::FormatStream::stream(char*)': C:/GTK/include/glibmm-2.4/glibmm/ustring.h:1069: error: stream_'中   未申报(首先使用此功能)

     

make.exe: * [main.o]错误1

     

执行终止

非常感谢任何有关设置的帮助。

谢谢!

0 个答案:

没有答案