Hi,
I've been following the tutorial on compiling SFML 2.1 with cmake, but I have stumbled upon the following error during the build process:
[ 33%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/Linux/GlxContext.cpp.o
In file included from /home/jeanne/tmp/SFML-2.1/src/SFML/Window/Linux/GlxContext.cpp:33:0:
/home/jeanne/tmp/SFML-2.1/src/SFML/Window/glext/glxext.h:670:22: error: ISO C++ forbids declaration of 'GLXContextID' with no type [-fpermissive]
typedef GLXContextID ( * PFNGLXGETCONTEXTIDEXTPROC) (const GLXContext context);
^
/home/jeanne/tmp/SFML-2.1/src/SFML/Window/glext/glxext.h:670:22: error: typedef 'GLXContextID' is initialized (use decltype instead)
/home/jeanne/tmp/SFML-2.1/src/SFML/Window/glext/glxext.h:670:26: error: 'PFNGLXGETCONTEXTIDEXTPROC' was not declared in this scope
typedef GLXContextID ( * PFNGLXGETCONTEXTIDEXTPROC) (const GLXContext context);
^
/home/jeanne/tmp/SFML-2.1/src/SFML/Window/glext/glxext.h:671:67: error: 'GLXContextID' has not been declared
typedef GLXContext ( * PFNGLXIMPORTCONTEXTEXTPROC) (Display *dpy, GLXContextID contextID);
^
src/SFML/Window/CMakeFiles/sfml-window.dir/build.make:310: recipe for target 'src/SFML/Window/CMakeFiles/sfml-window.dir/Linux/GlxContext.cpp.o' failed
make[2]: *** [src/SFML/Window/CMakeFiles/sfml-window.dir/Linux/GlxContext.cpp.o] Error 1
CMakeFiles/Makefile2:155: recipe for target 'src/SFML/Window/CMakeFiles/sfml-window.dir/all' failed
make[1]: *** [src/SFML/Window/CMakeFiles/sfml-window.dir/all] Error 2
Makefile:116: recipe for target 'all' failed
make: *** [all] Error 2
I first ran cmake, checked that all the dependencies were met, and then went with the defaults. Then I ran make to get the library built, but instead got the above error. The cmake output is:
$ cmake .
-- The C compiler identification is GNU 4.8.2
-- The CXX compiler identification is GNU 4.8.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib64/libX11.so
-- Found OpenGL: /usr/lib64/libGL.so
-- Found Freetype: /usr/lib64/libfreetype.so
-- Found GLEW: /usr/lib64/libGLEW.so
-- Found JPEG: /usr/lib64/libjpeg.so
-- Found OpenAL: /usr/lib64/libopenal.so
-- Found SNDFILE: /usr/lib64/libsndfile.so
-- Configuring done
-- Generating done
-- Build files have been written to: /home/jeanne/tmp/SFML-2.1
This is all on a 64-bit installation of Arch linux, gcc version 4.8.2. Could anyone provide some light on this issue? Thanks in advance for any help you may provide.