[opus] Antw: Re: opusfile Include fix

Peter Korsgaard peter at korsgaard.com
Mon Sep 18 10:08:27 UTC 2017

>>>>> "Ulrich" == Ulrich Windl <Ulrich.Windl at rz.uni-regensburg.de> writes:

 >>>> Jean-Marc Valin <jmvalin at jmvalin.ca> schrieb am 16.09.2017 um 08:12 in
 > Nachricht <29959506-9f3b-2ad1-fc02-2aea7c53c084 at jmvalin.ca>:
 >> Actually, you're supposed to add /usr/include/opus to your include path.
 >> That's why the includes don't have the "opus/" prefix.

 > Hi!

 > But that's uncommon: You also don't put /usr/include/sys into your
 > include path, but you still write #include <sys/stat.h> (for example).

For the headers that come with the C library, yes - But not for random
other libraries.

pkg-config takes care of providing the correct compiler flags to compile
and link against opusfile:

pkg-config --cflags opusfile

pkg-config --libs opusfile

The advantage of the sub directories is that you can have multiple
(incompatible) versions installed at the same time, E.G. GTK+ 2.x and

pkg-config --cflags gtk+-2.0
-pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/freetype2
pkg-config --cflags gtk+-3.0
-pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include

Bye, Peter Korsgaard

More information about the opus mailing list