{"id":1587,"date":"2022-08-30T15:17:46","date_gmt":"2022-08-30T15:17:46","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/27\/problem-about-gtkmm-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:17:46","modified_gmt":"2022-08-30T15:17:46","slug":"problem-about-gtkmm-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/problem-about-gtkmm-collection-of-common-programming-errors\/","title":{"rendered":"problem about gtkmm-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/ff98b534423075fdc17adc353ebdbb88?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nOswald<br \/>\nc++ gtk gtkmm cairo gdk<br \/>\nI have written the following code to set the cursor of a Gtk::Window from a Cairo::Context. When I run the program and move the cursor into the window, the cursor changes to a horizontal black line at the top, followed by some undefinable white shape at the bottom. I was expecting the cursor to change into a black 16\u00d716 square. Why doesn&#8217;t the cursor assume the shape I intended?#include &lt;gtkmm.h&gt;const int size = 16, hotspot = 0;class Window : public Gtk::Window {public:void change_cursor()<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/7c90b74ec5c16fcbe86757658faeb9ca?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nX.Strange<br \/>\nc++ ubuntu compiler-errors gtkmm<br \/>\ni install libgtkmm-3.0-dev in ubuntu 12.04 and i try to learn and write program with c++ and gtkmm 3 i go to this link &#8220;http:\/\/developer.gnome.org\/gtkmm-tutorial\/unstable\/sec-basics-simple-example.html.en&#8221; and try to compile simple example program :#include &lt;gtkmm.h&gt;int main(int argc, char *argv[]) {Glib::RefPtr&lt;Gtk::Application&gt; app =Gtk::Application::create(argc, argv,&#8221;org.gtkmm.examples.base&#8221;);Gtk::ApplicationWindow window;return app-&gt;run(window); }my file name is &#8220;basic.cc&#8221; a<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/b2014c8170f4d16a313cfa79071fd861?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nptomato<br \/>\nubuntu gtkmm<br \/>\nSo I just installed Oneiric and decided to try out gtkmm for a project (it has classes\/objects and I wanted to use a c library without bindings), installed the appropriate gtkmm*-dev, gtkmm*-doc using Synaptic followed the instructions shown here: http:\/\/developer.gnome.org\/gtkmm-tutorial\/3.0\/sec-basics-simple-example.html.ento get something basic working, and my terminal output comes out looking like this:g++ main.cc -o app `pkg-config &#8211;libs &#8211;cflags gtkmm-3.0` \/usr\/lib\/gcc\/x86_64-linux-gnu\/4.<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/ce9382e327253b8118e35f42384574d8?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nMahmoud Hossam<br \/>\nlinux eclipse gtkmm<br \/>\nI&#8217;m trying to compile the gtkmm Simple Example using Eclipse CDT, but it&#8217;s not working for some reasonI&#8217;m compiling this on Mandriva Linux and GCC 4.4.3I get this error, which I think is a linking error :Building target: Test Invoking: GCC C++ Linker g++ -L\/usr\/include\/gtkmm-2.4 -o&#8221;Test&#8221; .\/test.o .\/test.o: In function `main&#8217;: test.cpp:(.text+0x39): undefined reference to `Gtk::Main::Main(int&amp;, char**&amp;, bool)&#8217; test.cpp:(.text+0x43): undefined reference to `Gtk::Window::Window(Gtk::Wi<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/5X1PZ.jpg?s=32&amp;g=1\" \/><br \/>\ntaocp<br \/>\nc++ compiler-errors gtkmm allocator<br \/>\nI am writing a snakes and ladders game and I defined a function called draw_snake as follows:void draw_snake(const Cairo::RefPtr&lt;Cairo::Context&gt;&amp; cr, std::pair&lt;int,int&gt; snake, std::vector&lt; std::pair&lt;int,int&gt; &gt; boardcoords);When I make the call to this function I do it as follows:pair&lt;int, int&gt; snake = make_pair(100,1); draw_snake(cr, snake, boardcoords);boardcoords is a vector of pair&lt;int,int&gt;. The error message is saying that I have a fourth parameter whe<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/851acbab08553d1f7aa3eecad17f6aa9?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nKen Bloom<br \/>\nc++ gcc gtk g++ gtkmm<br \/>\nI am writing a GTKmm window program; the main window creates two buttons, one for English and one for Chinese. The user can click on the button to bring up a different window in the appropriate language. Currently I am having trouble initializing the multiple-item container inside the main window. It is an object of type MainWindowPane, which inherits Gtk::HBox.When I try to make, the compiler issues the following error: $ make g++ -g `pkg-config gtkmm-2.4 &#8211;cflags` -c MainWindow.cpp g++ -g<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/4f744a663ccfaf6a859e8cbdd7daacfa?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nm4tx<br \/>\nc++ eclipse-cdt gtkmm<br \/>\nI use Eclipse and I wanted to use gtkmm in it. I have following code:#include &lt;gtkmm.h&gt; #include &lt;iostream&gt;int main(int argc, char *argv[]) {Gtk::Main kit(argc, argv);Gtk::Window mainWindow;Gtk::Button button(&#8220;Click here&#8221;);mainWindow.set_title(&#8220;Eclipse\/GTKmm Demo&#8221;);mainWindow.set_border_width(4);mainWindow.set_default_size(200, 50);mainWindow.add(button);button.show();Gtk::Main::run(mainWindow);return 0; }I added pkg-config &#8211;cflags &#8211;libs gtkmm-3.0 (with grave accents, of course) to<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/026ae7a4c6f0b4be4333df9f78c30f4f?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\npaullj1<br \/>\nc++ gtk gtk+ gtkmm gtk3<br \/>\nI need to embed a very simple browser ( can parse HTML, and JS Ext ) in a Gtk Widget hopefully in gtkmm. I looked into gtkmozembed, but the c++ wrapper is very out dated, so I tried to just write it in C, but I&#8217;m already committed to Gtk+ 3.0, and gtkmozembed doesn&#8217;t work with Gtk+ 3.0. Is there a way to just extend Gtk::Widget and put a gecko parser in it? Can&#8217;t really find any gecko documentation, I keep getting redirected to gtkmozembed.Any ideas\/suggestions would be greatly appreciated.Edit:<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/026ae7a4c6f0b4be4333df9f78c30f4f?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\npaullj1<br \/>\nc++ c webkit gtk gtkmm<br \/>\nI&#8217;m trying to embed a web browser into a gtk project. I&#8217;m trying to use WebKitGTK (but I&#8217;m not committed to it), every time I try and use it to parse an Ext JS page, it crashes the entire application. Here&#8217;s the output, and how I&#8217;m including the .js files&#8230;** (ttocui_gtk:16360): DEBUG: NP_Initialize ** (ttocui_gtk:16360): DEBUG: NP_Initialize succeeded ** (ttocui_gtk:16360): DEBUG: NP_Initialize ** (ttocui_gtk:16360): DEBUG: NP_Initialize succeeded ** (ttocui_gtk:16360): DEBUG: NP_Initialize **<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/aec0e2fadf2a209ab6048bb68043a9a0?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nSubhamoy Sengupta<br \/>\nc++ linux gtkmm<br \/>\nI have a small application, where I want to create some buttons, toolbars, etc. but I do not want to use a pre-existing GTK icon theme, I want to create my own. So I looked for tutorials and whatnot, but as it turned out, it was not very well discussed online. So I tried to do something on my own:Header File:#include &lt;gtkmm.h&gt; #include &lt;string&gt; #include &lt;iostream&gt; #include &lt;errno.h&gt;class IconFactoryBuilder { public:IconFactoryBuilder();~IconFactoryBuilder();void RegisterN<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/9a8599064c68d4d7c337bb7f809b5838?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nMisel Ademi<br \/>\nc++ codeblocks gtkmm<br \/>\nI try to use gtkmm with code blocks. I installed everything but it shows me error in list.h Error is in linenamespace Gdk {Error message is C:\\gtkmm\\include\\gdkmm-2.4\\gdkmm\\list.h|4|error: unknown type name &#8216;namespace&#8217;| C:\\gtkmm\\include\\gdkmm-2.4\\gdkmm\\list.h|4|error: expected &#8216;=&#8217;, &#8216;,&#8217;, &#8216;;&#8217;, &#8216;asm&#8217; or &#8216;__attribute__&#8217; before &#8216;{&#8216; token| C:\\gtkmm\\include\\sigc++-2.0\\sigc++\\signal.h|8|fatal error: list: No such file or directory| ||=== Build finished: 3 errors, 0 warnings (0 minutes, 1 seconds) ===|C<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/849d81ce2636e2a81d91c4e5aa5543a7?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nnKandel<br \/>\nc++ gui codeblocks gtkmm<br \/>\nI try to use gtkmm with code blocks. I installed everything but it shows me error in libsigc++ header signal.h fatal error: list: No such file or directoryI couldn&#8217;t find what is wrong&#8230;The error is in this line.#include &lt;list&gt;I added #include &lt;list.h&gt; and now it shows me error in list.h file in line namespace Gdk and error message is_C:\\gtkmm\\include\\gdkmm-2.4\\gdkmm\\list.h|4|error: unknown type name &#8216;namespace&#8217;| C:\\gtkmm\\include\\gdkmm-2.4\\gdkmm\\list.h|4|error: expected &#8216;=&#8217;, &#8216;,&#8217;,<\/li>\n<\/ul>\n<p id=\"rop\"><small>Originally posted 2013-11-27 11:57:29. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>Oswald c++ gtk gtkmm cairo gdk I have written the following code to set the cursor of a Gtk::Window from a Cairo::Context. When I run the program and move the cursor into the window, the cursor changes to a horizontal black line at the top, followed by some undefinable white shape at the bottom. I [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1587","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1587","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=1587"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1587\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=1587"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=1587"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=1587"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}