gtkmm компилатор грешка codeblocks windows

Опитвам се да компилирам просто gtkmm приложение в кодови блокове, но получавам само грешки за файла ustring.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 et al, трябва да използвате поне gtkmm-3.4. Приложението е клас gtk 3.x и не е било правилно обвито до gtkmm-3.4.

person ergosys    schedule 09.09.2012