Notes for the Debian OpenCV packages: To compile code against OpenCV, use `pkg-config --cflags opencv`: gcc `pkg-config --cflags opencv` -c code.c -o code.o To link it afterwards, use `pkg-config --libs opencv`: gcc code.o -o code `pkg-config --libs opencv` -lotherlibs There is currently no way to exclude libcvaux or libhighgui from the link process. I will talk with upstream about this.