Re: Strange error in using ThumbnailFactory::create()
- From: "Jonathon Jongsma" <jonathon quotidian org>
- To: "Liangxu Wang" <wlx mygis org>
- Cc: gtkmm-list gnome org
- Subject: Re: Strange error in using ThumbnailFactory::create()
- Date: Wed, 10 Oct 2007 08:54:18 -0500
On 10/10/07, Liangxu Wang <wlx mygis org> wrote:
> Hi,
> I want to load the file's thumbnail, so Gnome::UI is used. The program
> can be compiled without any error, but can not start, with error:
> --------------
> GLib-ERROR **: The thread system is not yet initialized.
> aborting...
> --------------
> Code like this:
>
> #include <gtkmm.h>
> #include <libgnomeuimm.h>
> ----<snip>---
> Glib::RefPtr<Gdk::Pixbuf> thumbnail;
> Glib::RefPtr<Gnome::UI::ThumbnailFactory > th;
> //error with this line
> th=Gnome::UI::ThumbnailFactory::create(Gnome::UI::THUMBNAIL_SIZE_NORMAL);
> thumbnail=th->generate_thumbnail(uri,"application/pdf");
> if (thumbnail) return thumbnail;
> ----<snip>---
> So what's the problem here?
> Thanks.
> Sincerely yours,
> Liangxu Wang
Whenever you get errors such as 'foo is not initialized', it usually
means that you have forgotten to call a library initialization
function (in this case, it's complaining that Glib::thread_init()
wasn't called). Did you create a Gnome::Main object? My guess is
that libgnome calls the appropriate initialization functions within
the constructor of Gnome::Main.
--
jonner
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]