Re: Problems compiling Nautilus-media: configure is ok, compilation gives errors



On Mon, 2003-09-15 at 22:14, Giustiniano wrote:
> It's me again, and the problem is again Nautilus-media: now the 
> configure script is happy: it founds everything it needs, but I've 
> errors during the compilation process, and don't know how to solve this...
> here there's the message of the "make" istructions
> 
> media-info.c: In function `gst_media_info_read_idler':
> media-info.c:264: parse error before `*'
> media-info.c:267: `priv' undeclared (first use in this function)
> media-info.c:267: (Each undeclared identifier is reported only once
> media-info.c:267: for each function it appears in.)
> media-info.c:271: warning: unreachable code at beginning of switch statement
> make[2]: *** [libgstmedia_info_la-media-info.lo] Error 1
> make[2]: Leaving directory 
> `/home/giustiniano/garnome-0.27.1/gnome/nautilus-media/work/main.d/nautilus-media-0.3.3.1/media-info'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory 
> `/home/giustiniano/garnome-0.27.1/gnome/nautilus-media/work/main.d/nautilus-media-0.3.3.1'
> make: *** [all] Error 2

It's the usual problem with some compilers (like gcc 2.95) not allowing
variable declarations in other places than the beginning of blocks.

So either switch compiler to one that supports it or edit the file and
move the declaration of the priv variable to the beginning of the block.
The attached patch should do the latter.


Cheers,
Jens

--- media-info.c.dist	2003-09-15 23:01:02.000000000 +0200
+++ media-info.c	2003-09-15 23:01:52.000000000 +0200
@@ -259,8 +259,10 @@
 gst_media_info_read_idler (GstMediaInfo *info, GstMediaInfoStream **streamp)
 {
+  GstMediaInfoPriv *priv;
+
   /* if it's NULL then we're sure something went wrong higher up) */
   if (info == NULL) return FALSE;
 
-  GstMediaInfoPriv *priv = info->priv;
+  priv = info->priv;
 
   g_assert (streamp != NULL);


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