Re: gtk-- compile fails



Havoc Pennington wrote:

> No problem here, and no code in the header. Can you email me your
> pixmap.gen_h, pixmap.h, and the error message?
>

Sorry - I should have read the error message more.  It's not specific to the
pixmap code - even
the ios class has duplicate definitions!

I'll post this anyway, but maybe makefiles would be more constructive.  I've
killed the GPL stuff.

--- pixmap_gen.h --------------------------------
// -*- C++ -*- // this is for the .gen_h, I realize gensig puts one in

/* pixmap.h
 *
 * Copyright (C) 1998 EMC Capital Management Inc.
 * Developed by Havoc Pennington <hp@pobox.com>
 *
 */

#include <gtk--/widget.h>
#include <libgnomeui/gnome-pixmap.h>

CLASS_START;
class Gnome_Pixmap : public Gtk_Widget {
public:
  SIGNAL_START(Pixmap,Widget);
  BASE_PREFIX(Gtk);

  static void cpp_class_init(GtkObject*);
  Gnome_Pixmap(GnomePixmap *castitem);
  virtual ~Gnome_Pixmap();

  static bool isGnomePixmap(Gtk_Object *checkcast);

  Gnome_Pixmap();
  Gnome_Pixmap(const gchar * filename);
  Gnome_Pixmap(const gchar * filename, int width, int height);
  Gnome_Pixmap(char ** xpm_data);
  Gnome_Pixmap(char ** xpm_data, int width, int height);
  Gnome_Pixmap(GdkImlibImage * im);
  Gnome_Pixmap(GdkImlibImage * im, int width, int height);
  Gnome_Pixmap(unsigned char * rgb_data, unsigned char * alpha,
        int rgb_width, int rgb_height);
  Gnome_Pixmap(unsigned char * rgb_data, unsigned char * alpha,
        int rgb_width, int rgb_height,
        GdkImlibColor * shape_color);
  Gnome_Pixmap(unsigned char * rgb_data, unsigned char * alpha,
        int rgb_width, int rgb_height,
        int width, int height);


  void load(const gchar * filename);
  void load(const gchar * filename, int width, int height);
  void load(char ** xpm_data);
  void load(char ** xpm_data, int width, int height);
  void load(GdkImlibImage * im);
  void load(GdkImlibImage * im, int width, int height);
  void load(unsigned char * rgb_data, unsigned char * alpha,
     int rgb_width, int rgb_height);
  void load(unsigned char * rgb_data, unsigned char * alpha,
     int rgb_width, int rgb_height,
     GdkImlibColor * shape_color);
  void load(unsigned char * rgb_data, unsigned char * alpha,
     int rgb_width, int rgb_height,
     int width, int height);


  SIGNAL_END();
  GnomePixmap* gtkobj() const { return GNOME_PIXMAP(gtkobject); }
protected:
};

IMPL_START;

/* pixmap.cc
 *
 * Copyright (C) 1998 EMC Capital Management Inc.
 * Developed by Havoc Pennington <hp@pobox.com>
 */

Gnome_Pixmap::Gnome_Pixmap()
  : Gtk_Widget(GTK_WIDGET(gtk_type_new(c_class.get_type())))
{}

Gnome_Pixmap::Gnome_Pixmap(GnomePixmap *castitem)
  : Gtk_Widget(GTK_WIDGET(castitem))
{}

Gnome_Pixmap::~Gnome_Pixmap()
{
  // nothing
}

bool
Gnome_Pixmap::isGnomePixmap(Gtk_Object *checkcast)
{
  return GNOME_IS_PIXMAP(checkcast->gtkobj());
}

Gnome_Pixmap::Gnome_Pixmap(const gchar * filename)
  : Gtk_Widget(GTK_WIDGET(gtk_type_new(c_class.get_type())))
{
}

Gnome_Pixmap::Gnome_Pixmap(const gchar * filename, int width, int height)
  : Gtk_Widget(GTK_WIDGET(gtk_type_new(c_class.get_type())))
{
}

Gnome_Pixmap::Gnome_Pixmap(char ** xpm_data)
  : Gtk_Widget(GTK_WIDGET(gtk_type_new(c_class.get_type())))
{
}

Gnome_Pixmap::Gnome_Pixmap(char ** xpm_data, int width, int height)
  : Gtk_Widget(GTK_WIDGET(gtk_type_new(c_class.get_type())))
{
}

Gnome_Pixmap::Gnome_Pixmap(GdkImlibImage * im)
  : Gtk_Widget(GTK_WIDGET(gtk_type_new(c_class.get_type())))
{
}

Gnome_Pixmap::Gnome_Pixmap(GdkImlibImage * im, int width, int height)
  : Gtk_Widget(GTK_WIDGET(gtk_type_new(c_class.get_type())))
{
}

Gnome_Pixmap::Gnome_Pixmap(unsigned char * rgb_data, unsigned char * alpha,
      int rgb_width, int rgb_height)
  : Gtk_Widget(GTK_WIDGET(gtk_type_new(c_class.get_type())))
{
}

Gnome_Pixmap::Gnome_Pixmap(unsigned char * rgb_data, unsigned char * alpha,
      int rgb_width, int rgb_height,
      GdkImlibColor * shape_color)
  : Gtk_Widget(GTK_WIDGET(gtk_type_new(c_class.get_type())))
{
}

Gnome_Pixmap::Gnome_Pixmap(unsigned char * rgb_data, unsigned char * alpha,
      int rgb_width, int rgb_height,
      int width, int height)
  : Gtk_Widget(GTK_WIDGET(gtk_type_new(c_class.get_type())))
{
}


void
Gnome_Pixmap::load(const gchar * filename)
{
  gnome_pixmap_load_file(gtkobj(),filename);
}

void
Gnome_Pixmap::load(const gchar * filename, int width, int height)
{
  gnome_pixmap_load_file_at_size(gtkobj(),filename,width,height);
}

void
Gnome_Pixmap::load(char ** xpm_data)
{
  gnome_pixmap_load_xpm_d(gtkobj(),xpm_data);
}

void
Gnome_Pixmap::load(char ** xpm_data, int width, int height)
{
  gnome_pixmap_load_xpm_d_at_size(gtkobj(),xpm_data,width,height);
}

void
Gnome_Pixmap::load(GdkImlibImage * im)
{
  gnome_pixmap_load_imlib(gtkobj(),im);
}

void
Gnome_Pixmap::load(GdkImlibImage * im, int width, int height)
{
  gnome_pixmap_load_imlib_at_size(gtkobj(),im,width,height);
}

void
Gnome_Pixmap::load(unsigned char * rgb_data, unsigned char * alpha,
     int rgb_width, int rgb_height)
{
  gnome_pixmap_load_rgb_d(gtkobj(),rgb_data,alpha,rgb_width,rgb_height);
}

void
Gnome_Pixmap::load(unsigned char * rgb_data, unsigned char * alpha,
     int rgb_width, int rgb_height,
     GdkImlibColor * shape_color)
{
  gnome_pixmap_load_rgb_d_shaped(gtkobj(),rgb_data,alpha,
     rgb_width,rgb_height,shape_color);
}

void
Gnome_Pixmap::load(unsigned char * rgb_data, unsigned char * alpha,
     int rgb_width, int rgb_height,
     int width, int height)
{
  gnome_pixmap_load_rgb_d_at_size(gtkobj(),rgb_data,alpha,
      rgb_width,rgb_height,width,height);
}

----pixmap.h------------------------
// -*- c++ -*-
/*
   This file has been generated by gtksig from ./../pixmap.gen_h. DO NOT
MODIFY!!!
*/
#ifndef GNOMEMM_pixmap_HEADER
#define GNOMEMM_pixmap_HEADER
// -*- C++ -*- // this is for the .gen_h, I realize gensig puts one in

/* pixmap.h
 *
 * Copyright (C) 1998 EMC Capital Management Inc.
 * Developed by Havoc Pennington <hp@pobox.com>
 */

#include <gtk--/widget.h>
#include <libgnomeui/gnome-pixmap.h>

  struct Gnome_c_signals_Pixmap : public Gtk_c_signals_Widget {
  };
  class Gnome_Pixmap;
  class Gnome_Class_Proxy_Pixmap {
  public:
    typedef Gnome_Pixmap CppObjectType;
    typedef GnomePixmap BaseObjectType;
    typedef GnomePixmapClass BaseClassType;
    struct proxy_Object {
      BaseObjectType object;
    };
    struct proxy_Class {
      BaseClassType parent_class;
      Gnome_c_signals_Pixmap sigs;
    };
    static void class_init_function(proxy_Class *p);
    static void object_init_function(proxy_Object *);
    guint get_type();
    char *name;
    guint (*get_type_func_ptr)();
  };
#line 26 "./../pixmap.gen_h"

class Gnome_Pixmap : public Gtk_Widget {
public:
#line 29 "./../pixmap.gen_h"

#line 30 "./../pixmap.gen_h"


  static void cpp_class_init(GtkObject*);
  Gnome_Pixmap(GnomePixmap *castitem);
  virtual ~Gnome_Pixmap();

  static bool isGnomePixmap(Gtk_Object *checkcast);

  Gnome_Pixmap();
  Gnome_Pixmap(const gchar * filename);
  Gnome_Pixmap(const gchar * filename, int width, int height);
  Gnome_Pixmap(char ** xpm_data);
  Gnome_Pixmap(char ** xpm_data, int width, int height);
  Gnome_Pixmap(GdkImlibImage * im);
  Gnome_Pixmap(GdkImlibImage * im, int width, int height);
  Gnome_Pixmap(unsigned char * rgb_data, unsigned char * alpha,
        int rgb_width, int rgb_height);
  Gnome_Pixmap(unsigned char * rgb_data, unsigned char * alpha,
        int rgb_width, int rgb_height,
        GdkImlibColor * shape_color);
  Gnome_Pixmap(unsigned char * rgb_data, unsigned char * alpha,
        int rgb_width, int rgb_height,
        int width, int height);


  void load(const gchar * filename);
  void load(const gchar * filename, int width, int height);
  void load(char ** xpm_data);
  void load(char ** xpm_data, int width, int height);
  void load(GdkImlibImage * im);
  void load(GdkImlibImage * im, int width, int height);
  void load(unsigned char * rgb_data, unsigned char * alpha,
     int rgb_width, int rgb_height);
  void load(unsigned char * rgb_data, unsigned char * alpha,
     int rgb_width, int rgb_height,
     GdkImlibColor * shape_color);
  void load(unsigned char * rgb_data, unsigned char * alpha,
     int rgb_width, int rgb_height,
     int width, int height);



  typedef GnomePixmap BaseObjectType;
  static Gnome_Class_Proxy_Pixmap c_class;
  virtual Gtk_c_signals_Base *internal_getsignalbase();
  static void cpp_class_init(GnomePixmapClass *o,Gnome_c_signals_Pixmap *s) {

    Gtk_Widget::cpp_class_init((GtkWidgetClass *)o,s);
  }
#line 71 "./../pixmap.gen_h"

  GnomePixmap* gtkobj() const { return GNOME_PIXMAP(gtkobject); }
protected:
};

#endif

----stderr from make-----------------
main.lo: In function `oct(ios &)':
/usr/include/g++/iostream.h:269: multiple definition of `oct(ios &)'
functions.lo:/usr/include/g++/iostream.h:269: first defined here
pixmap.lo: In function `Connection_impl type_info function':
/home/gnomecvs/gtk--/gnome--/gnome--/./../pixmap.gen_h(.text+0x0): multiple
definition of `connect_to_function(Signal0 &, void (*)(void))'
functions.lo(.text+0x0):/home/gnomecvs/gtk--/gnome--/gnome--/functions.cc:
first defined here
collect2: ld returned 1 exit status
make[3]: *** [libgnomemm.la] Error 1
make[3]: Leaving directory `/home/gnomecvs/gtk--/gnome--/gnome--'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/gnomecvs/gtk--/gnome--'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/gnomecvs/gtk--'
make: *** [all-recursive-am] Error 2
--------------------

There's a lot more than that - but it all looks much the same.  Here's the
actual command make issued
to link:

c++ -shared -Wl,-soname -Wl,libgnomemm.so.1 -o .libs/libgnomemm.so.1.0.1
gnome--.lo functions.lo about.lo app.lo appbar.lo canvas-ellipse.lo
canvas-group.lo canvas-image.lo canvas-item.lo canvas-line.lo canvas-rect.lo
canvas-text.lo canvas-widget.lo canvas.lo color-selector.lo dialog.lo
icon-list.lo layout.lo main.lo pixmap.lo  -L/usr/local/lib -L/usr/lib
-L/usr/X11R6/lib -lgnomeui -lgdk_imlib -ljpeg -ltiff -lungif -lpng -lz -lSM
-lICE -lgtk-1.1 -lgdk-1.1 -lgmodule-1.1 -lXext -lX11 -lm -lgnome
-lgnomesupport -ldb -lglib-1.1 -ldl -lc

Andrew Clausen



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