Namespace confusion

Paul Matthew Reilly paul@pajato.com
Wed Aug 11 14:44:00 GMT 1999


I'm investigating how far starting with the CLASSPATH gtk+ heavyweight
AWT peer implementation will get me and I've run into a namespace
problem that I could use some help with.

Here is a section of what gcjh generated for GtkGenericPeer.h:

  #include <java/lang/Object.h>

  extern "Java"
  {
    namespace gnu
    {
      namespace java
      {
        namespace awt
        {
          namespace peer
          {
            namespace gtk
            {
              class GtkGenericPeer;
            };
          };
        };
      };
    };
    namespace java
    {
      namespace awt
      {
        class EventQueue;
      };
    };
  };
  
  class gnu::java::awt::peer::gtk::GtkGenericPeer : public java::lang::Object

Here is the output from make:

  cd /usr/local/devel/classpath/cni/gnu/java/awt/peer/gtk/
  make -k 
  g++  -I/usr/local/lib/glib/include -I/usr/local/devel/classpath/cni -I/usr/local/devel/libgcj/libjava/include -I/usr/local/devel/libgcj/libjava -I/usr/local/devel/libgcj/objdir/i686-pc-linux-gnu/libjava -I/usr/local/devel/libgcj/objdir/i686-pc-linux-gnu/libjava/include  -c GtkListPeer.cc -o GtkListPeer.o
  In file included from /usr/local/devel/classpath/cni/gnu/java/awt/peer/gtk/GtkComponentPeer.h:8,
                   from GtkListPeer.h:8,
                   from GtkListPeer.cc:2:
  /usr/local/devel/classpath/cni/gnu/java/awt/peer/gtk/GtkGenericPeer.h:37: `lang' is not a class or namespace
  /usr/local/devel/classpath/cni/gnu/java/awt/peer/gtk/GtkGenericPeer.h:38: `Object' is not a class or namespace
  /usr/local/devel/classpath/cni/gnu/java/awt/peer/gtk/GtkGenericPeer.h:38: confused by earlier errors, bailing out
  make: *** [GtkListPeer.o] Error 1

Thanks,
Paul


More information about the Java mailing list