[glade--]glade-0.6.2 compile issues (with patches)



Hi,

I just started using glade a few days ago, and was about to submit some
patches when I saw the new version had been released. I've just had a chance
to download and start using the new version now, but I had a few problems with
it. I got my project to compile again, but here's what I had to do.
(I was using a RedHat 7.1 machine (gcc 2.96RH) with glademm/gtkmm/gnomemm compiled from sources.)

1. glade--.cc doesn't compile, error about things in stdio.h
diff -urN glademm-0.6.2/src/glade--.cc glademm-0.6.2-compiles/src/glade--.cc
--- glademm-0.6.2/src/glade--.cc	Wed Apr 25 15:13:07 2001
+++ glademm-0.6.2-compiles/src/glade--.cc	Sat Oct 13 15:31:46 2001
@@ -17,6 +17,7 @@
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
+#include <cstdio>
 #include "TagStream.hh"
 #include "Cxx.hh"
 #include "Configuration.hh"
@@ -24,7 +25,6 @@
 #include <cstdlib>
 #include <sys/stat.h> // for makedir
 #include <getopt.h>
-#include <cstdio>
 
 #ifndef HAVE_GETOPT_LONG
 #include "getopt.h"

2. [Removed, as I just saw Alexander Barton's post + patch for the same issue.]

3. In generated code, gnome-about.cc generates code that doesn't compile with
the current gtkmm code with gcc 2.96. I'm not entirely sure where the blame
lies, as it seems a template specialisation for <T *> isn't used with a T *
const, so maybe gtkmm needs an extra specialisation for <T * const>, but this
patch generates code which works:

diff -urN glademm-0.6.2/src/writers/gnome_about.cc glademm-0.6.2-compiles/src/writers/gnome_about.cc
--- glademm-0.6.2/src/writers/gnome_about.cc	Wed Feb 21 13:50:09 2001
+++ glademm-0.6.2-compiles/src/writers/gnome_about.cc	Sat Oct 13 16:04:44 2001
@@ -66,7 +66,7 @@
    char *buffer=(char*)alloca(authors.size()+1);
    memcpy(buffer,authors.c_str(),authors.size()+1);
    char *token,*stringp=buffer;
-   f.Declaration() << "const char * const("<< name << "_authors[])";
+   f.Declaration() << "const char * "<< name << "_authors[]";
    f.Assignment().StartBlock();
    if ((token=strsep(&stringp,"\n")))
    {  f << Configuration.CString_WithQuotes(token) << ", ";

4. I had to add some extra bits to the generated Makefile.am to get my project
to compile, such as -lgnomemm to the LDADD line, I didn't note them down as
carefully as I should have, but I can post them if people are interested. I
assume the intent is that generated code should at least compile without any
fiddling?

I hope this helps someone, as I'm sure I'll be asking for someone's help when
I start getting to the tricky bits of my project ;)

~Ainsley

-- 
 ----------------------------------------------------------
  / Ainsley 'Marble' Pereira / http://www.snowplains.org /
 / Don't drink and drive.




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