Re: Load Glade with libglademm library in VS 2005 Beta 2 Error



I'm from spain and my english is very bad, so sorry if
 i don't speak very well.

I'm using VS 2005 Beta 2 with gtkmm-devel-2.8.3-1.exe and
gtk-win32-devel-2.8.10-rc1.exe.

When i install gtk-win32-devel-2.8.10-rc1.exe don't detect visual
studio enviroment but my problem is that i install this packet ok?,
and choose cygwin enviroment because i can't choose other. Then i
create a win32 console proyect to use with gtkmm and i want load xml
glade file.

The code that i'm using is very simple but when i try to load xml file
with:

Glib::RefPtr<Gnome::Glade::Xml xmlptr =  Gnome::Glade::Xml::create("/data/prueba.glade",NULL,NULL);
 or


Glib::RefPtr<Gnome::Glade::Xml> xmlptr =  Gnome::Glade::Xml::create("prueba.glade");
 the vs2005 crash when i execute with the follown error:
            Unhandled exception at 0x781442d0 (msvcr80.dll) in PruebaGUI.exe: 0xC0000005: Access violation reading location 0x00000000.
            Unhandled exception at 0x781442d0 (msvcr80.dll) in PruebaGUI.exe:> 0xC0000005: Access violation reading location 0x00000000.
            Unhandled exception at 0x781442d0 (msvcr80.dll) in PruebaGUI.exe:> 0xC0000005: Access violation reading location 0x00000000.
  
This error ocurred into msvcr80.dll and i'm reading a lot of and after two days i don't know waht happen. I'd like if you help me because it's necesary load xml glade file with  vs2005 to my technical degree project. Very very thanks for your help and sorry because i'm wasting your  time.


> The code is:
>
> #include <gtkmm.h>
> #include <libglademm.h >
> #include <libglademm/xml.h>
> #include <iostream>
>
> class Simple : public Gtk::Window
> {
>     public:
>         Simple(BaseObjectType* base_object,
>             const Glib::RefPtr<Gnome::Glade::Xml>& glade_xml);
>         virtual ~Simple();
>
>     protected:
>       //Signal handlers:
>       virtual void on_button1_clicked();
>
>       //Member widgets:
>       Glib::RefPtr<Gnome::Glade::Xml> glade;
>         Gtk::Entry *e;
> };
>
> void Simple::on_button1_clicked()
> {
>   std::cout << e->get_text() << std::endl;
>   e->set_text("");
> }
>
>
> Simple::Simple(BaseObjectType* base_object,
>                                 const Glib::RefPtr<Gnome::Glade::Xml>&
> glade_xml) :
>     Gtk::Window(base_object)
> {
>     glade=glade_xml;
>     Gtk::Button *btnB1;
>     glade->get_widget("button1", btnB1);
>     btnB1->signal_clicked().connect(sigc::mem_fun(*this,
> &Simple::on_button1_clicked));
>
>     glade->get_widget("entry1", e);
> }
>
> Simple::~Simple() {
>
> }
>
> int main (int argc, char *argv[])
> {
>     Gtk::Main kit(argc, argv, false);
>
>     Glib::RefPtr<Gnome::Glade::Xml> xmlptr =
>             Gnome::Glade::Xml::create("/data/prueba.gui",NULL,NULL);
>
>     Simple *simple;
>
>     xmlptr->get_widget_derived("window1", simple);
>     Gtk::Main::run(*simple);
>     return 0;
> }


2006/2/17, Murray Cumming <murrayc murrayc com>:
Please use the mailing list.

On Fri, 2006-02-17 at 17:54 +0100, Diego Martinez wrote:
--
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]