Building OpenGL SDK: compile error “X11/extensions/XInput.h”

If you get this error:

src/freeglut_internal.h:111:39: fatal error: X11/extensions/XInput.h: No such file or directory

This might save you some time searching for the correct dev packages to install. The package it is in in the Debian repositories is called x11proto-input-dev, but it contains the file XI.h which contains the correct headers freeglut is including. Symlink the file and you’re good to go.

cd /usr/include/X11/extensions && sudo ln -s XI.h XInput.h


This entry was posted in Development, Linux & BSD and tagged , . Bookmark the permalink. Trackbacks are closed, but you can post a comment.


  1. Posted August 28, 2014 at 01:13 | Permalink

    Thanks! This worked. I actually already had the package installed, just making the symlink worked for me.

  2. Many_Thanks@sample.c
    Posted October 20, 2014 at 19:43 | Permalink

    Like the previous commenter the library was installed and linking it was the fix. (Ubuntu 14.04, 14.04.)

    Thank You

    Hello, Google spider: src/freeglut_internal.h:111:39: fatal error: X11/extensions/XInput.h: No such file or directory

  3. Joe
    Posted May 22, 2015 at 00:57 | Permalink

    Great! Thank you a lot 🙂

  4. Ulises
    Posted November 18, 2015 at 02:44 | Permalink

    Thank you !

  5. lilie
    Posted September 30, 2016 at 08:05 | Permalink

    WIth the link the error disappeared replaced by others : ../../glut-3.5/src/glut_input.c:29:1: error : unknow type name ‘XDevice’ XDevice_glutTablet = NULL; ../../glut-3.5/src/glut_input.c:30:1: error : unknow type name ‘XDevice’ XDevice_glutDiasl = NULL; ../../glut-3.5/src/glut_input.c:31:1: error : unknow type name ‘XDevice’ XDevice*_glutSpaceball = NULL; ….

  6. Leonardo Aita
    Posted July 15, 2017 at 22:58 | Permalink

    Thanks a lot!!

  7. AlexZ005
    Posted December 10, 2017 at 09:20 | Permalink

    Saved my time, thanks!

  8. stevep
    Posted September 1, 2018 at 03:47 | Permalink

    Still helping folks after 4 years and 2 days, nice 😉


  9. Tom
    Posted September 4, 2018 at 09:39 | Permalink

    on opensuse leap 15, install the package libXi-devel

  10. Posted September 27, 2018 at 17:05 | Permalink

    Thanks! any trick for “fatal error: X11/extensions/Xrandr.h: No such file or directory” ? Cheers!

Post a Comment

Your email is never published nor shared.

You may use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>