Antonio Coralles a écrit :
Thanks for your tipp ... maybe sombody knows why the follwoing code:
#include <gtkmm/window.h>
#include <gtkmm/main.h>
#include <libgnomecanvasmm/canvas.h>
#include <libgnomecanvasmm/text.h>
#include <libgnomecanvasmm/init.h>
using namespace Gtk;
class CanvasWindow : public Window
{
public:
CanvasWindow() : _text(*_canvas.root(), 0, 0, "Hey")
{
set_size_request(400, 400);
add(_canvas);
show_all_children();
}
virtual ~CanvasWindow() {}
private:
Gnome::Canvas::Canvas _canvas;
Gnome::Canvas::Text _text;
};
int main(int argc, char **argv)
{
Gnome::Canvas::init();
Main kit(argc, argv);
CanvasWindow win;
Main::run(win);
}
leads directly to a segfault (i'm using canvasmm-2.6.1). gdb says
Program received signal SIGSEGV, Segmentation fault.
0xb7fb0fa2 in Gnome::Canvas::Item::item_construct () from
/usr/lib/libgnomecanvasmm-2.6.so.1
(gdb) back
#0 0xb7fb0fa2 in Gnome::Canvas::Item::item_construct () from
/usr/lib/libgnomecanvasmm-2.6.so.1
#1 0xb7fbacd3 in Gnome::Canvas::Text::Text () from
/usr/lib/libgnomecanvasmm-2.6.so.1
#2 0x0804beaf in CanvasWindow::CanvasWindow ()
#3 0x0804bd04 in main ()
Thanks,
Antonio
_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org <mailto:gtkmm-list gnome org>
http://mail.gnome.org/mailman/listinfo/gtkmm-list
I tried your source and it runs fine. I use the version 2.10.0 of
canvasmm
Hmm, that's strange - i've now installed canvasmm-2.10.0 and i get
exactly the same error ... As i'm using gentoo linux, this may be some
distribution specific bug.
Antonio
_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org <mailto:gtkmm-list gnome org>
http://mail.gnome.org/mailman/listinfo/gtkmm-list
What is the command you run to compile your sources ?
I suggest you upgrade all your gtk libraries to their last stable
version and try again.
By the way, I'm using g++ 3.3.5
--
Yann Normand
Sogeti-Transiciel