Re: Re: simple project Gtkmm + Glade
- From: "Dmitry Kruglov" <lsd secy biz>
- To: "gtkmm-list, gtkmm-list" <gtkmm-list gnome org>
- Subject: Re: Re: simple project Gtkmm + Glade
- Date: Sun, 07 Oct 2012 13:28:42 +0200
Please help me. Demo project not work.
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Вход в каталог `/home/dimka/MyProject/glade2'
"/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/GNU-Linux-x86/glade2
make[2]: Вход в каталог `/home/dimka/MyProject/glade2'
mkdir -p build/Debug/GNU-Linux-x86
rm -f build/Debug/GNU-Linux-x86/main.o.d
g++ `pkg-config gtkmm-2.4 --cflags --libs` -c -g -MMD -MP -MF build/Debug/GNU-Linux-x86/main.o.d -o build/Debug/GNU-Linux-x86/main.o main.cpp
main.cpp: In function ‘int main(int, char**)’:
main.cpp:22: error: ‘Application’ is not a member of ‘Gtk’
main.cpp:22: error: ‘Application’ is not a member of ‘Gtk’
main.cpp:22: error: template argument 1 is invalid
main.cpp:22: error: invalid type in declaration before ‘=’ token
main.cpp:22: error: ‘Gtk::Application’ has not been declared
main.cpp:58: error: base operand of ‘->’ is not a pointer
make[2]: *** [build/Debug/GNU-Linux-x86/main.o] Ошибка 1
make[2]: Выход из каталога `/home/dimka/MyProject/glade2'
make[1]: *** [.build-conf] Ошибка 2
make[1]: Выход из каталога `/home/dimka/MyProject/glade2'
make: *** [.build-impl] Ошибка 2
project attached.
--- оригинальное сообщение ---
От: Florian Philipp <lists binarywings net>
Дата: 01.10.2012 00:48:55
Кому: Gtkmm list <gtkmm-list gnome org>
Тема: Re: simple project Gtkmm + Glade
> Am 30.09.2012 18:02, schrieb Dmitry Kruglov:
> > --- оригинальное сообщение ---
> > От: Florian Philipp <lists binarywings net>
> > Дата: 30.09.2012 15:23:40
> > Кому: gtkmm-list gnome org
> > Тема: Re: simple project Gtkmm + Glade
> >
> >> Am 30.09.2012 04:31, schrieb lsd secy biz:
> >>> Hi all.
> >>>
> >>> Please get me link (or prject) simple project Gtkmm + Glade.
> 1 button
> >>
> >>> and 2 edit box. After down button read edit box1 and write to
> edit
> >>> box 2.
> >>>
> >>
> >> Do you know the official tutorial?
> >> http://developer.gnome.org/gtkmm-tutorial/unstable/chapter-builder.html
>
> >>
> >>
> >>> I'm doing the first steps in programming Gtkmm. I also wanted
> to
> >>> know:
> >>>
> >>> 1. Directory of all functions GtkMM detailing.
> >>
> >> You mean the API documentation? Look here:
> >> http://developer.gnome.org/gtkmm/stable/
> >>
> [...]
> >>
> >> Regards,
> >> Florian Philipp
> >>
> >
> >
> > Thank you.
> >
> > This gtkmm 3 or gtkmm2.4? I need gtkmm2.4.
> >
> > Thank you again.
> > Best regards, Dmitry.
> >
>
> Please keep the discussion on-list.
>
> I cannot find a link to a 2.x version of the documents right now. Maybe
> someone else can.
>
> I'm using 2.4 myself and never had a problem using the newer
> documentation. The API docs usually mention when something was added in
>
> 2.2 or later.
>
> Regards,
> Florian Philipp
>
>
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> https://mail.gnome.org/mailman/listinfo/gtkmm-list
>
/*
* File: main.cpp
* Author: dimka
*
* Created on 7 Ð?кÑ?Ñ?бÑ?Ñ? 2012 г., 18:33
*/
#include <gtkmm.h>
#include <iostream>
Gtk::Dialog* pDialog = 0;
static
void on_button_clicked()
{
if(pDialog)
pDialog->hide(); //hide() will cause main::run() to end.
}
int main (int argc, char **argv)
{
Glib::RefPtr<Gtk::Application> app = Gtk::Application::create(argc, argv, "org.gtkmm.example");
//Load the GtkBuilder file and instantiate its widgets:
Glib::RefPtr<Gtk::Builder> refBuilder = Gtk::Builder::create();
try
{
refBuilder->add_from_file("basic.glade");
}
catch(const Glib::FileError& ex)
{
std::cerr << "FileError: " << ex.what() << std::endl;
return 1;
}
catch(const Glib::MarkupError& ex)
{
std::cerr << "MarkupError: " << ex.what() << std::endl;
return 1;
}
catch(const Gtk::BuilderError& ex)
{
std::cerr << "BuilderError: " << ex.what() << std::endl;
return 1;
}
//Get the GtkBuilder-instantiated Dialog:
refBuilder->get_widget("DialogBasic", pDialog);
if(pDialog)
{
//Get the GtkBuilder-instantiated Button, and connect a signal handler:
Gtk::Button* pButton = 0;
refBuilder->get_widget("quit_button", pButton);
if(pButton)
{
pButton->signal_clicked().connect( sigc::ptr_fun(on_button_clicked) );
}
app->run(*pDialog);
}
delete pDialog;
return 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]