Re: failing to get PangoContext
- From: Tony Graham <Tony Graham Sun COM>
- To: gtk-i18n-list gnome org
- Subject: Re: failing to get PangoContext
- Date: Mon, 20 Oct 2003 13:36:33 +0100 (BST)
Daniel Glassey <danglassey ntlworld com> wrote at Sat, 18 Oct 2003 21:45:32 +0100:
> Hi,
> When I try and run a pretty minimal program below which just opens up a
> display and tries to get a PangoContext from it it fails with the error
> below.
>
> Am I missing something obvious?
Yes. Well, something simple but not necessarily obvious until you've
stumbled as you have.
Add:
g_type_init();
before you do anything with GObject or any library that uses
GObjects. In your case, add it before you call any Pango functions.
As the g_type_init() documentation says, "Prior to any use of the type
system, g_type_init() has to be called to initialize the type system
and assorted other code portions (such as the various fundamental type
implementations or the signal system)."
Regards,
Tony Graham
------------------------------------------------------------------------
XML Technology Center - Dublin
Sun Microsystems Ireland Ltd Phone: +353 1 8199708
Hamilton House, East Point Business Park, Dublin 3 x(70)19708
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]