Re: [Fwd: [Gstreamer-gstmm] Fix for compile error]



Milosz Derezynski wrote:
Hey! Sorry for the late reply!

As for the va_list patch, i'm not sure right now where it's needed (it
might be needed but i wouldn't know where); where did you encounter a
problem with it? A compiler warning output would be helpful.

As for the autogen patch, i'm going to commit it.

Milosz

Thanks Milosz. The compiler error I get (shown in the original e-mail below) is the following:

caps.cc: In member function 'void Gst::Caps::simple_valist(char*, const __va_list_tag (&)[1])': caps.cc:151: error: invalid conversion from 'const __va_list_tag*' to '__va_list_tag*' caps.cc:151: error: initializing argument 3 of 'void gst_caps_set_simple_valist(GstCaps*, char*, __va_list_tag*)'
make[5]: *** [caps.lo] Error 1

The relevant code is in "caps.cc" and looks like the following:

void Caps::simple_valist(char* field, const va_list& varargs)
{
gst_caps_set_simple_valist(gobj(), field, varargs);
}

On this system, the compiler is having trouble with the call to gst_caps_set_simple_valist(), specifically the "varargs" parameter. It seems that in the "Caps::simple_valist()" prototype it is declared as a "const va_list&", but gst_caps_set_simple_valist() expects it to be non-constant (see http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstCaps.html#gst-caps-set-simple-valist). Should the compiler not be complaining? BTW, I'm using gcc-4.2.3 if it makes any difference.

-Jose

2007/11/13, José Alburquerque <jaalburquerque cox net>:
Milosz:

I sent the e-mail below to the gstreamer-gstmm list but didn't get an
answer so I'm sending it to the gtkmm-list in case the diff I sent might
be useful.  Also, I'm attaching another diff (made to the autogen.sh
file) that fixes dealing with automake in such a way as to use other
versions like 1.10.  Are these diff's useful?

-Jose

-------- Original Message --------
Subject:        [Gstreamer-gstmm] Fix for compile error
Date:   Wed, 07 Nov 2007 20:15:59 -0500
From:   José Alburquerque <jaalburquerque cox net>
To:     Milosz Derezynski <internalerror gmail com>,
gstreamer-gstmm lists sourceforge net



Hi Milosz.  It took me a while, but I finally began seeing somewhat what
I can wrap and I thought I'd start by building what's in svn first.  I
did, and I got the following compile error which I think I fixed with
the diff I'm sending you:

make[5]: Entering directory
`/home/jose/Projects/Programming/gstreamermm-devel/gst/gstmm'
/bin/sh ../../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H
-DG_LOG_DOMAIN=\"gstmm\"  -I../../gst -I../../gst -pthread
-I/usr/include/glibmm-2.4 -I/usr/lib/glibmm-2.4/include
-I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
-I/usr/include/gstreamer-0.10 -I/usr/include/libxml2     -g -O2 -MT
caps.lo -MD -MP -MF .deps/caps.Tpo -c -o caps.lo caps.cc
 g++ -DHAVE_CONFIG_H -DG_LOG_DOMAIN=\"gstmm\" -I../../gst -I../../gst
-pthread -I/usr/include/glibmm-2.4 -I/usr/lib/glibmm-2.4/include
-I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
-I/usr/include/gstreamer-0.10 -I/usr/include/libxml2 -g -O2 -MT caps.lo
-MD -MP -MF .deps/caps.Tpo -c caps.cc  -fPIC -DPIC -o .libs/caps.o
caps.cc: In member function 'void Gst::Caps::simple_valist(char*, const
__va_list_tag (&)[1])':
caps.cc:151: error: invalid conversion from 'const __va_list_tag*' to
'__va_list_tag*'
caps.cc:151: error:   initializing argument 3 of 'void
gst_caps_set_simple_valist(GstCaps*, char*, __va_list_tag*)'
make[5]: *** [caps.lo] Error 1

Do you think this is a good fix?  Thanks.

-Jose




-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/


_______________________________________________
Gstreamer-gstmm mailing list
Gstreamer-gstmm lists sourceforge net
https://lists.sourceforge.net/lists/listinfo/gstreamer-gstmm








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