Ошибка кодовых блоков компилятора gtkmm windows

Пытаюсь скомпилировать простое приложение gtkmm в кодовых блоках, но просто получаю ошибки в файле usstring.h

C:\gtkmm\include\glibmm-2.4\glibmm\ustring.h|861|error: ISO C++ forbids declaration of `wostringstream' with no type|
C:\gtkmm\include\glibmm-2.4\glibmm\ustring.h|861|error: expected `;' before "StreamType"|
C:\gtkmm\include\glibmm-2.4\glibmm\ustring.h|865|error: `StreamType' does not name a type|
C:\gtkmm\include\glibmm-2.4\glibmm\ustring.h|906|error: expected constructor, destructor, or type conversion before '&' token|
C:\gtkmm\include\glibmm-2.4\glibmm\ustring.h|906|error: expected `,' or `;' before '&' token|
C:\gtkmm\include\glibmm-2.4\glibmm\ustring.h|912|error: expected constructor, destructor, or type conversion before '&' token|
C:\gtkmm\include\glibmm-2.4\glibmm\ustring.h|912|error: expected `,' or `;' before '&' token|
C:\gtkmm\include\glibmm-2.4\glibmm\ustring.h||In member function `void Glib::ustring::FormatStream::stream(const T&)':|
C:\gtkmm\include\glibmm-2.4\glibmm\ustring.h|1057|error: `stream_' undeclared (first use this function)|
C:\gtkmm\include\glibmm-2.4\glibmm\ustring.h|1057|error: (Each undeclared identifier is reported only once for each function it appears in.)|
C:\gtkmm\include\glibmm-2.4\glibmm\ustring.h||In member function `void Glib::ustring::FormatStream::stream(const char*)':|
C:\gtkmm\include\glibmm-2.4\glibmm\ustring.h|1063|error: `stream_' undeclared (first use this function)|
C:\gtkmm\include\glibmm-2.4\glibmm\ustring.h||In member function `void Glib::ustring::FormatStream::stream(char*)':|
C:\gtkmm\include\glibmm-2.4\glibmm\ustring.h|1069|error: `stream_' undeclared (first use this function)|
||=== Build finished: 11 errors, 0 warnings ===|

С параметрами сборки я добавил pkg-config --libs gtkmm-2.4 к параметрам компоновщика и pkg-config --cflags gtkmm-2.4 к компилятору -> другие параметры.

Код, который я использую, является простым примером

#include <gtkmm.h>


int main(int argc, char *argv[])
{
  Glib::RefPtr<Gtk::Application> app =
    Gtk::Application::create(argc, argv,
      "org.gtkmm.examples.base");

  Gtk::ApplicationWindow window;

  return app->run(window);
}

Буду признателен за любую помощь, у меня win7 x64.


person user1657973    schedule 09.09.2012    source источник


Ответы (1)


Если вы хотите использовать Gtk::Application и др., вам нужно использовать как минимум gtkmm-3.4. Приложение является классом gtk 3.x и не было должным образом упаковано до gtkmm-3.4.

person ergosys    schedule 09.09.2012