I'm wondering whether pkg-config might not be outputing correct flags
for freeglut.

For example this programme:

    #include <GL/glut.h>
    int main(void)
    {
        return 0;
    }

- fails to build with:
    cc `pkg-config --cflags --libs freeglut` foo.c

because:

    In file included from foo.c:1:
    In file included from /usr/local/include/GL/glut.h:17:
    /usr/local/include/GL/freeglut_std.h:143:13: fatal error: 'GL/gl.h' file 
not found
    #   include <GL/gl.h>
                ^~~~~~~~~
    1 error generated.

But it builds ok if we add /usr/X11R6/include to the include path:

    cc `pkg-config --cflags --libs freeglut` -I/usr/X11R6/include foo.c


For me, "pkg-config --cflags --libs freeglut" outputs:

    -I/usr/local/include -L/usr/local/lib -lglut

So should pkg-config also output "-I/usr/X11R6/include" in this case?


I'm running OpenBSD 6.8 GENERIC.MP#98 amd64


Thanks for any clarification,

- Jules

-- 
http://op59.net


Reply via email to