kcode
October 25th, 2008, 11:30 AM
I'm unable to compile this program:
#include <gst/gst.h>
int
main (int argc,
char *argv[])
{
const gchar *nano_str;
guint major, minor, micro, nano;
gst_init (&argc, &argv);
gst_version (&major, &minor, µ, &nano);
if (nano == 1)
nano_str = "(CVS)";
else if (nano == 2)
nano_str = "(Prerelease)";
else
nano_str = "";
printf ("This program is linked against GStreamer %d.%d.%d %s\n",
major, minor, micro, nano_str);
return 0;
}
with following error:
gcc -Wall $(pkg-config --cflags --libs gstreamer-0.10.21) hello.c -o hello
Package gstreamer-0.10.21 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gstreamer-0.10.21.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gstreamer-0.10.21' found
hello.c:1:21: error: gst/gst.h: No such file or directory
hello.c: In function ‘main’:
hello.c:7: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
hello.c:7: error: ‘nano_str’ undeclared (first use in this function)
hello.c:7: error: (Each undeclared identifier is reported only once
hello.c:7: error: for each function it appears in.)
hello.c:8: error: ‘guint’ undeclared (first use in this function)
hello.c:8: error: expected ‘;’ before ‘major’
hello.c:10: error: ‘major’ undeclared (first use in this function)
hello.c:10: error: ‘minor’ undeclared (first use in this function)
hello.c:10: error: ‘micro’ undeclared (first use in this function)
hello.c:10: error: ‘nano’ undeclared (first use in this function)
hello.c:17: warning: incompatible implicit declaration of built-in function ‘printf’
i installed gstreamer-0.10.21 manually in my home directory.
i also did:
export PKG_CONFIG_PATH=$PKGCONFIG:$libdir/pkgconfig
link i used:
used:http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/section-helloworld-compilerun.html
thanks
#include <gst/gst.h>
int
main (int argc,
char *argv[])
{
const gchar *nano_str;
guint major, minor, micro, nano;
gst_init (&argc, &argv);
gst_version (&major, &minor, µ, &nano);
if (nano == 1)
nano_str = "(CVS)";
else if (nano == 2)
nano_str = "(Prerelease)";
else
nano_str = "";
printf ("This program is linked against GStreamer %d.%d.%d %s\n",
major, minor, micro, nano_str);
return 0;
}
with following error:
gcc -Wall $(pkg-config --cflags --libs gstreamer-0.10.21) hello.c -o hello
Package gstreamer-0.10.21 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gstreamer-0.10.21.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gstreamer-0.10.21' found
hello.c:1:21: error: gst/gst.h: No such file or directory
hello.c: In function ‘main’:
hello.c:7: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
hello.c:7: error: ‘nano_str’ undeclared (first use in this function)
hello.c:7: error: (Each undeclared identifier is reported only once
hello.c:7: error: for each function it appears in.)
hello.c:8: error: ‘guint’ undeclared (first use in this function)
hello.c:8: error: expected ‘;’ before ‘major’
hello.c:10: error: ‘major’ undeclared (first use in this function)
hello.c:10: error: ‘minor’ undeclared (first use in this function)
hello.c:10: error: ‘micro’ undeclared (first use in this function)
hello.c:10: error: ‘nano’ undeclared (first use in this function)
hello.c:17: warning: incompatible implicit declaration of built-in function ‘printf’
i installed gstreamer-0.10.21 manually in my home directory.
i also did:
export PKG_CONFIG_PATH=$PKGCONFIG:$libdir/pkgconfig
link i used:
used:http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/section-helloworld-compilerun.html
thanks