I need help!



Hi, guys:

This morning I'm playing with EOG. I'm trying to create a new abstract
class EogView to the bug #546504. This is a new custom widget (child of
GtkBin) that defines the current API of EogScrollView.

When I try to compile a have this error:

---------------------------------------------------------------------
copying selected object files to avoid basename conflicts...
  CC     eog-main.o
  CCLD   eog
  GISCAN Eog-3.0.gir
Invalid GType function: 'eog_view_get_type'

** ERROR **: Failed to extract GType data: Failed to find symbol
'eog_view_get_type'
Command '['./eog',
'--introspect-dump=/tmp/tmp-introspectKnfCul/functions.txt,/tmp/tmp-introspectKnfCul/dump.xml']' returned non-zero exit status -5
make[3]: *** [Eog-3.0.gir] Error 1
make[3]: se sale del directorio «/home/jsanchez/dev/git/gnome/eog/src»
make[2]: *** [all] Error 2
make[2]: se sale del directorio «/home/jsanchez/dev/git/gnome/eog/src»
make[1]: *** [all-recursive] Error 1
make[1]: se sale del directorio «/home/jsanchez/dev/git/gnome/eog»
make: *** [all] Error 2
*** Error during phase build of eog: ########## Error running make   ***
[1/1]
---------------------------------------------------------------------

Attached to this mail I send EogView.h and EogView.c that define and
implement the widget.

What am I forgetting?

Thanks in advance.
/* Eye Of GNOME -- Eog Image Viewer Custom Widget
 *
 * Copyright (C) 2011 The Free Software Foundation
 *
 * Author: Javier Sánchez <jsanchez deskblue com>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */

#include <gtk/gtk.h>

#include "eog-view.h"

struct _EogViewPrivate {
};

G_DEFINE_ABSTRACT_TYPE (EogView, eog_view, GTK_TYPE_BIN)

static void     eog_view_class_init (EogViewClass *class);
static void     eog_view_init       (EogView *view);

static void
eog_view_class_init (EogViewClass *class)
{	
	g_type_class_add_private (class, sizeof (EogViewPrivate));
}

static void
eog_view_init (EogView *view)
{
  	view->priv = G_TYPE_INSTANCE_GET_PRIVATE (view,
						  EOG_TYPE_VIEW,
						  EogViewPrivate);
}

/* Eye Of GNOME -- Eog Image Viewer Custom Widget
 *
 * Copyright (C) 2011 The Free Software Foundation
 *
 * Author: Javier Sánchez <jsanchez deskblue com>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */

#ifndef EOG_VIEW_H
#define EOG_VIEW_H

#include <gtk/gtk.h>

G_BEGIN_DECLS

#define EOG_TYPE_VIEW            (eog_view_get_type ())
#define EOG_VIEW(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), EOG_TYPE_VIEW, EogView))
#define EOG_VIEW_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), EOG_TYPE_VIEW, EogViewClass))
#define EOG_IS_VIEW(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EOG_TYPE_VIEW))
#define EOG_IS_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EOG_TYPE_VIEW))
#define EOG_VIEW_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), EOG_TYPE_VIEW, EogViewClass))

typedef struct _EogView        EogView;
typedef struct _EogViewClass   EogViewClass;
typedef struct _EogViewPrivate EogViewPrivate;

struct _EogView {
	GtkBin parent_instance;

	EogViewPrivate *priv;
};

struct _EogViewClass {
	GtkBinClass parent_class;
};

GType    eog_view_get_type         (void) G_GNUC_CONST;

G_END_DECLS

#endif /* EOG_VIEW_H */


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