Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/visual-studio-code/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Compiler construction gtkmm编译器错误代码块窗口_Compiler Construction_Gtk_Codeblocks_Gtkmm - Fatal编程技术网

Compiler construction gtkmm编译器错误代码块窗口

Compiler construction gtkmm编译器错误代码块窗口,compiler-construction,gtk,codeblocks,gtkmm,Compiler Construction,Gtk,Codeblocks,Gtkmm,试图在代码块中编译一个简单的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

试图在代码块中编译一个简单的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);
}
#包括
int main(int argc,char*argv[])
{
Glib::RefPtr应用程序=
Gtk::应用程序::创建(argc、argv、,
“org.gtkmm.examples.base”);
Gtk::ApplicationWindow窗口;
返回应用程序->运行(窗口);
}

如果您想使用
Gtk::Application
等,请至少使用gtkmm-3.4。我正在运行win7 x64,非常感谢您的帮助。应用程序是GTK3.x类,直到gtkmm-3.4才正确包装