Quote:
Originally Posted by TheIndependentAquarius
Code:
/usr/include/gstreamer-1.0/gst/sdp/sdp.h
|
As you can see from above, it's either
<gstreamer-1.0/gst/sdp/sdp.h> or
pkg-config --cflags gstreamer-1.0 plus
<gst/sdp/sdp.h>, i.e. place
$(pkg-config --cflags) before, and
$(pkg-config --libs) after the source on the command line:
Code:
gcc -Wall $(pkg-config --cflags gstreamer-1.0) helloworld.c $(pkg-config --libs gstreamer-1.0) -o helloworld
Alternatively, you can do it like this:
Code:
CFLAGS="$(pkg-config --cflags gstreamer-1.0)"
LDFLAGS="$(pkg-config --libs gstreamer-1.0)"
gcc -Wall $CFLAGS helloworld.c $LDFLAGS -o helloworld
GCC reads its options from left to right. If it encounters
helloworld.c first, it processes the file, sees
<gst/sdp/sdp.h> in it, but cannot find
/usr/include/gst/sdp/sdp.h, even although
pkg-config sets
-I/usr/include/gstreamer-1.0 afterwards.