RE: Glib assertion failed messages




Sorry, i missed the assertion message.

-----Original Message-----
From: gtk-app-devel-list-bounces gnome org
[mailto:gtk-app-devel-list-bounces gnome org]On Behalf Of Kumar
Siddharth
Sent: Tuesday, June 05, 2007 8:13 PM
To: Joao Moreira; gtk-app-devel-list gnome org
Subject: RE: Glib assertion failed messages



sometimes it is related to the value of PKG_CONFIG_PATH and LD_LIBRARY_PATH,
depending upon the libraries against which you have compiled and linked.

Regards,
Siddharth
-----Original Message-----
From: gtk-app-devel-list-bounces gnome org
[mailto:gtk-app-devel-list-bounces gnome org]On Behalf Of Joao Moreira
Sent: Tuesday, June 05, 2007 7:55 PM
To: gtk-app-devel-list gnome org
Subject: Glib assertion failed messages


Hi,

I have a very simple program that uses glib (indirectly). Actually I only
define
a GError variable. I'm getting the following messages when I run it :

(process:3085): GLib-GObject-CRITICAL **: gtype.c:2240: initialization
assertion failed, use IA__g_type_init() prior to this function
(process:3085): GLib-GObject-CRITICAL **: g_object_new: assertion
`G_TYPE_IS_OBJECT (object_type)' failed

Although it says CRITICAL, the program does seem to run... what is wrong
here ?
and how can I fix it and remove these messages ?

I've included my c++ code below.

Thanks for any help,
Joao

//--------------------------------------------------------------------------
----

#include <iostream>
#include <glib.h>
#include <glib/poppler.h>

using namespace std;

class Pdf {
public:
  Pdf(const char *filename);

private:
  PopplerDocument *doc;
};

Pdf::Pdf(const char *filename) {
  GError *err = NULL;
  doc = poppler_document_new_from_file(filename, NULL, &err);
  if(err != NULL) {
    cout << "Can\'t open " << filename << "\n";
    cout << err->message << "\n";
  }
}

int
main(int argc, char **argv)
{
  char *filename = "/home/joao/unidialog/200503.pdf";

  Pdf *pdf = new Pdf(filename);
}


--
Joao Moreira de Sa Coutinho
joao moreira free fr


_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list




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