<gstmm.h> include errors



Hi Milosz. I built gstmm and installed it on my system. I tried to use it in a c++ program by including the main "gstmm.h" file and got the following errors, so I made some changes to "gstmm.h" (see the diff):

[04:49][jose sweety:~/Projects/Programming/C++/Tests]$ g++ gstreamer-test.cc `pkg-config --cflags --libs gstmm-1.0`
In file included from gstreamer-test.cc:1:
/usr/include/gstmm-1.0/gstmm.h:4:28: error: gstmm/gstclock.h: No such file or directory /usr/include/gstmm-1.0/gstmm.h:5:30: error: gstmm/gstelement.h: No such file or directory /usr/include/gstmm-1.0/gstmm.h:6:28: error: gstmm/gsterror.h: No such file or directory /usr/include/gstmm-1.0/gstmm.h:7:29: error: gstmm/gstformat.h: No such file or directory /usr/include/gstmm-1.0/gstmm.h:8:31: error: gstmm/gstiterator.h: No such file or directory /usr/include/gstmm-1.0/gstmm.h:9:29: error: gstmm/gstobject.h: No such file or directory /usr/include/gstmm-1.0/gstmm.h:10:26: error: gstmm/gstpad.h: No such file or directory /usr/include/gstmm-1.0/gstmm.h:11:32: error: gstmm/gststructure.h: No such file or directory /usr/include/gstmm-1.0/gstmm.h:12:34: error: gstmm/gstsystemclock.h: No such file or directory
[04:50][jose sweety:~/Projects/Programming/C++/Tests]

Also, would anyone know how to debug libraries wrapped with gmmproc (like gstreamermm) (Is it even possible)? I tried something basic like creating a Gst::Element unsuccessfully with the following short code which always outputs the failure message:

#include <iostream>
#include <gstmm.h>

using namespace std;

int main (int argc, char* argv[]) {
   Gst::init(argc, argv);

   Glib::RefPtr<Gst::Element> element =
       Gst::Element::create("fakesrc", "source");

   if (!element) {
       cout << "Failed to created gst element." << endl;
   }
}

Thanks.

-Jose
Index: gst/gstmm.h
===================================================================
--- gst/gstmm.h	(revision 78)
+++ gst/gstmm.h	(working copy)
@@ -1,15 +1,15 @@
 #ifndef _GSTMM_H_
 #define _GSTMM_H_
 
-#include <gstmm/gstclock.h>
-#include <gstmm/gstelement.h>
-#include <gstmm/gsterror.h>
-#include <gstmm/gstformat.h>
-#include <gstmm/gstiterator.h>
-#include <gstmm/gstobject.h>
-#include <gstmm/gstpad.h>
-#include <gstmm/gststructure.h>
-#include <gstmm/gstsystemclock.h>
+#include <gstmm/clock.h>
+#include <gstmm/element.h>
+#include <gstmm/error.h>
+#include <gstmm/format.h>
+#include <gstmm/iterator.h>
+#include <gstmm/object.h>
+#include <gstmm/pad.h>
+#include <gstmm/structure.h>
+#include <gstmm/systemclock.h>
 
 #include <gstmm/init.h>
 #include <gstmm/wrap_init.h>
Index: tools/m4/convert_gst.m4
===================================================================
--- tools/m4/convert_gst.m4	(revision 78)
+++ tools/m4/convert_gst.m4	(working copy)
@@ -49,7 +49,7 @@
 _CONVERSION(`GstStructure*',`Structure*',`((Structure*) ($3))')
 _CONVERSION(`const Glib::RefPtr<Caps>&',`const GstCaps*',__CONVERT_REFPTR_TO_P)
 _CONVERSION(`const xmlNodePtr&',`xmlNodePtr',`$3')
-_CONVERSION(`const va_list&',`va_list',`$3')
+_CONVERSION(`const va_list&',`va_list',`const_cast<va_list&>($3)')
 _CONVERSION(`GstBus*',`Glib::RefPtr<Bus>',`wrap($3)')
 
 _CONVERSION(`Format&',`GstFormat*',`(($2) &($3))')
Index: autogen.sh
===================================================================
--- autogen.sh	(revision 78)
+++ autogen.sh	(working copy)
@@ -1,6 +1,7 @@
 #! /bin/sh
 
 PKG_NAME=gstmm
+MIN_AUTOMAKE_VERSION=1.9
 
 srcdir=`dirname $0`
 test "x$srcdir" = x && srcdir=.
@@ -16,14 +17,31 @@
     exit 1
 fi
 
-(automake-1.9 --version) < /dev/null > /dev/null 2>&1 || {
-	echo
-	DIE=1
-	echo "You must have automake installed to compile gstmm."
-	echo "Download the appropriate package for your distribution,"
-	echo "or see http://www.gnu.org/software/automake";
-}
+# awk program to transform the output of automake --version
+# into an integer value suitable for numeric comparison (taken from gtkmm).
+extract_version='{ printf "%.0f", 1000000 * v[split($1, v, " ")] + 1000 * $2 + $3; exit }'
 
+min_automake_version=`echo "$MIN_AUTOMAKE_VERSION" | awk -F. "$extract_version"`
+
+for version in 1.9 ""
+do
+  automake_version=`automake${version:+-$version} --version < /dev/null 2>/dev/null | awk -F. "$extract_version"`
+  if test "$automake_version" -ge "$min_automake_version" 2>/dev/null
+  then
+    automake=automake${version:+-$version}
+    break;
+  fi
+done
+
+if [ "x$automake" == "x" ]
+then
+  echo
+  echo "You must have at least version 1.9 of automake installed"
+  echo "to compile gstmm.  Download the appropriate package for your"
+  echo "distribution, or see http://www.gnu.org/software/automake";
+  exit 1
+fi
+
 MAKE=`which gnumake`
 test -x "$MAKE" || MAKE=`which gmake`
 test -x "$MAKE" || MAKE=`which make`
@@ -49,7 +67,7 @@
 #autoheader
 
 echo "Building makefiles."
-automake --add-missing || exit 1
+$automake --add-missing || exit 1
 
 echo "Building configure."
 


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