Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7194443
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T20:22:20+00:00 2026-05-28T20:22:20+00:00

This is my program: #include <gtkmm.h> int main (int argc, char* argv[]) { Gtk::Main

  • 0

This is my program:

#include <gtkmm.h>

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

Glib::RefPtr<Gtk::Builder> builder = Gtk::Builder::create_from_file("practice_1_builder.glade");

Gtk::Window win;
builder->get_widget("winobj", win);
Gtk::Main::run(win);

return EXIT_SUCCESS;
}

I use this command in terminal to compile it, as I use for any other GTK+ program I can correctly compile:

g++ myprog.cpp -o myprog `dpkg-config --cflags --libs gtkmm-3.0`

And I get this error:

builder_0.cpp: In function ‘int main(int, char**)’:
builder_0.cpp:10:35: error: no matching function for call to ‘Gtk::Builder::get_widget(const char [7], Gtk::Window&)’
builder_0.cpp:10:35: note: candidate is:
/usr/include/gtkmm-3.0/gtkmm/builder.h:435:8: note: template<class T_Widget> void    Gtk::Builder::get_widget(const Glib::ustring&, T_Widget*&)

I tried many twiddles, defining win as pointer, converting the string literal to Glib::ustring, …, but didn’t work.
Appreciating helps! 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T20:22:21+00:00Added an answer on May 28, 2026 at 8:22 pm

    The message is very clear to me. T_Widget*& means, that you have to pass a (reference to a ) pointer. I changed your code to this:

    Gtk::Window *win;
    builder->get_widget("winobj", win);
    Gtk::Main::run(*win);
    

    Now it should work as expected.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is my program: #include <stdio.h> int main(int argc, char* argv[]) { char buf[1024]
This program: #include <iostream> #include <cstdlib> #include <string> int main(int argc, const char *argv[])
I just translated this program, #include <stdio.h> int dam[1000][1000]; int main (int argc, const
Check out this program #include<stdio.h> int main (){ char c='a'; printf(%d %d, sizeof(c),sizeof('a')); }
I have this program #include <stdio.h> int main() { char arr[100]; printf(%d, (int)sizeof(0,arr)); }
Consider this little program: #include <stdio.h> int main() { char c = 0xFF; printf(%d\n,
I have this code: #include <gtkmm.h> #include <unistd.h> void send_msg(Gtk::Entry* entry, int* fd); Glib::ustring*
I created this program: #include <iostream> #include <fstream> using namespace std; int main ()
I make this program :: #include<stdio.h> char *raw_input(char *msg); main() { char *s; *s
I have this program in c++: #include <iostream> using namespace std; int main() {

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.