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

  • Home
  • SEARCH
  • 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 9213319
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T01:43:08+00:00 2026-06-18T01:43:08+00:00

so i am making a basic hello world app in c++ here is the

  • 0

so i am making a basic hello world app in c++ here is the code

View.h

#ifndef VIEW_H
#define VIEW_H

#include <gtkmm/button.h>
#include <gtkmm/window.h>

class View : public Gtk::Window
{
    public:
        View();
        virtual ~View();

protected:
    //signal handlers
    void on_button_clicked();


    //Member Widgets
    Gtk::Button m_button;
}

#endif

View.cpp

#include "helloWorld.h"
#include <iostream>

View::View(): m_buton("Hello World")
{
set_border_width(10);

m_button.signal_clicked().connect(sigc::mem_fun(*this, &View::on_button_clicked));

add (m_button);

m_button.show();


}

View::~View()
{
}


void View::on_button_clicked()
{
        std::cout << "Hello World" << std::endl;
}

Main.cpp

#include "View.h"
#include <gtkmm/main.h>

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

View helloWorld;

Gtk::Main::run(helloWorld);

return 0;
}

and finally my makefile

Out: Main.o View.o
    g++ -o Out Main.o View.o `pkg-config gtkmm-3.0 --cflags --libs`

Main.o: Main.cpp View.h
    g++ -c Main.cpp `pkg-config gtkmm-3.0 --cflags --libs`

View.o: View.cpp View.h
    g++ -c View.cpp `pkg-config gtkmm-3.0 --cflags --libs`

I have Gtkmm 3.0 installed, and have looked around extensivly to find an answer, my error is

g++ -c Main.cpp `pkg-config gtkmm-3.0 --cflags --libs`
In file included from /usr/include/glibmm-2.4/glibmm/optioncontext.h:27:0,
                 from /usr/include/gtkmm-3.0/gtkmm/main.h:36,
                 from Main.cpp:2:
/usr/include/glibmm-2.4/glibmm/optionentry.h:30:8: error: expected unqualified-id before string constant
make: *** [Main.o] Error 1

how do i Fix this? it looks to me somewhere in my main method triggers an issue with the gtkmm code? i’m confused my code is almost exactly what i found online for how to do this i merely changed the name of the HelloWorld Class to View

  • 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-06-18T01:43:10+00:00Added an answer on June 18, 2026 at 1:43 am

    You forgot the ; at the end of your class definition.

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

Sidebar

Related Questions

Alright, here goes. I'm making a very basic app, and I want the user
I have an app that I am making a basic built-in web browser for
I just installed Ubuntu and tried making the famed Hello World program to make
Am making a basic phonegap based android app. All working perfectly and using localstorage
I am making a basic PHP source viewer for my blog's example code folder.
I am making a basic platform game for the iPhone and I have encountered
I am making a basic little game in Java and I want to have
so I'm making some basic programming language (just for exercise). I've made simple grammar
I was just refreshing my JavaScript/Jquery skills and I thought of making a basic
So i am running into a very odd error. I am making a basic

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.