This is very cool
I'm able to build the latest code. However linking to the resulting libraries fails like this:
$ clang++ -I/home/mgp/tmp/SFML-cc3dc29ef42fbd6e3442a9d9ce000c9d52f2ee34/include -L/home/mgp/tmp/sfml2-head-build/lib -lsfml-window -lsfml-graphics -v -rpath /home/mgp/tmp/sfml2-head-build/lib -o w w.cc
FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610
Target: x86_64-unknown-freebsd9.2
Thread model: posix
"/usr/bin/clang++" -cc1 -triple x86_64-unknown-freebsd9.2 -emit-obj -mrelax-all -disable-free -main-file-name w.cc -mrelocation-model static -mdisable-fp-elim -masm-verbose -mconstructor-aliases -munwind-tables -target-cpu x86-64 -v -resource-dir /usr/bin/../lib/clang/3.3 -I /home/mgp/tmp/SFML-cc3dc29ef42fbd6e3442a9d9ce000c9d52f2ee34/include -fdeprecated-macro -fdebug-compilation-dir /home/mgp/tmp/sfml2-head-build -ferror-limit 19 -fmessage-length 190 -mstackrealign -fobjc-runtime=gnustep -fobjc-default-synthesize-properties -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -backend-option -vectorize-loops -o /tmp/w-nKu15Z.o -x c++ w.cc
clang -cc1 version 3.3 based upon LLVM 3.3 default target x86_64-unknown-freebsd9.2
ignoring nonexistent directory "/usr/include/c++/4.2/backward/backward"
ignoring nonexistent directory "/usr/bin/../lib/clang/3.3/include"
ignoring duplicate directory "/usr/include/c++/4.2"
ignoring duplicate directory "/usr/include/c++/4.2/backward"
ignoring duplicate directory "/usr/include/c++/4.2/backward"
#include "..." search starts here:
#include <...> search starts here:
/home/mgp/tmp/SFML-cc3dc29ef42fbd6e3442a9d9ce000c9d52f2ee34/include
/usr/include/c++/4.2
/usr/include/c++/4.2/backward
/usr/include/clang/3.3
/usr/include
End of search list.
"/usr/bin/ld" --eh-frame-hdr -dynamic-linker /libexec/ld-elf.so.1 --hash-style=both --enable-new-dtags -o w /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o -L/home/mgp/tmp/sfml2-head-build/lib -L/usr/lib -lsfml-window -lsfml-graphics -rpath /home/mgp/tmp/sfml2-head-build/lib /tmp/w-nKu15Z.o -lstdc++ -lm -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/crtend.o /usr/lib/crtn.o
/home/mgp/tmp/sfml2-head-build/lib/libsfml-window.so: undefined reference to `sf::priv::JoystickImpl::getCapabilities() const'
/home/mgp/tmp/sfml2-head-build/lib/libsfml-window.so: undefined reference to `XRRConfigCurrentConfiguration'
/home/mgp/tmp/sfml2-head-build/lib/libsfml-window.so: undefined reference to `sf::priv::JoystickImpl::update()'
/home/mgp/tmp/sfml2-head-build/lib/libsfml-window.so: undefined reference to `sf::priv::JoystickImpl::isConnected(unsigned int)'
/home/mgp/tmp/sfml2-head-build/lib/libsfml-window.so: undefined reference to `sf::priv::JoystickImpl::close()'
/home/mgp/tmp/sfml2-head-build/lib/libsfml-window.so: undefined reference to `XRRSetScreenConfig'
/home/mgp/tmp/sfml2-head-build/lib/libsfml-window.so: undefined reference to `sf::priv::JoystickImpl::initialize()'
/home/mgp/tmp/sfml2-head-build/lib/libsfml-window.so: undefined reference to `sf::priv::JoystickImpl::cleanup()'
/home/mgp/tmp/sfml2-head-build/lib/libsfml-window.so: undefined reference to `sf::priv::JoystickImpl::open(unsigned int)'
/home/mgp/tmp/sfml2-head-build/lib/libsfml-window.so: undefined reference to `XRRFreeScreenConfigInfo'
/home/mgp/tmp/sfml2-head-build/lib/libsfml-window.so: undefined reference to `XRRGetScreenInfo'
/home/mgp/tmp/sfml2-head-build/lib/libsfml-window.so: undefined reference to `XRRConfigSizes'
Looks like the joystick stuff did not get built?
This is how I built SFML:
$ cmake -G "Unix Makefiles" -D CMAKE_CXX_COMPILER=/usr/bin/clang++ -D CMAKE_C_COMPILER=/usr/bin/clang -D CMAKE_CXX_FLAGS="-stdlib=libstdc++" -D CMAKE_C_FLAGS="-stdlib=libstdc++ -std=c99" ../SFML-cc3dc29ef42fbd6e3442a9d9ce000c9d52f2ee34
-- The C compiler identification is Clang 3.3.0
-- The CXX compiler identification is Clang 3.3.0
-- Check for working C compiler: /usr/bin/clang
-- Check for working C compiler: /usr/bin/clang -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/clang++
-- Check for working CXX compiler: /usr/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Looking for XOpenDisplay in /usr/local/lib/libX11.so;/usr/local/lib/libXext.so
-- Looking for XOpenDisplay in /usr/local/lib/libX11.so;/usr/local/lib/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/local/lib/libX11.so
-- Found OpenGL: /usr/local/lib/libGL.so
-- Found Freetype: /usr/local/lib/libfreetype.so (found version "2.5.0")
-- Found GLEW: /usr/local/lib/libGLEW.so
-- Found JPEG: /usr/local/lib/libjpeg.so
-- Found OpenAL: /usr/local/lib/libopenal.so
-- Found SNDFILE: /usr/local/lib/libsndfile.so
-- Configuring done
-- Generating done
-- Build files have been written to: /home/mgp/tmp/sfml2-head-build
[mgp@home ~/tmp/sfml2-head-build]$ make
Scanning dependencies of target sfml-system
[ 1%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Clock.cpp.o
[ 2%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Err.cpp.o
[ 3%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Lock.cpp.o
[ 5%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Mutex.cpp.o
[ 6%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Sleep.cpp.o
[ 7%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/String.cpp.o
[ 9%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Thread.cpp.o
[ 10%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/ThreadLocal.cpp.o
[ 11%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Time.cpp.o
[ 13%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Unix/ClockImpl.cpp.o
[ 14%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Unix/MutexImpl.cpp.o
[ 15%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Unix/SleepImpl.cpp.o
[ 17%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Unix/ThreadImpl.cpp.o
[ 18%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Unix/ThreadLocalImpl.cpp.o
Linking CXX shared library ../../../lib/libsfml-system.so
[ 18%] Built target sfml-system
Scanning dependencies of target sfml-window
[ 19%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/Context.cpp.o
[ 21%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/GlContext.cpp.o
[ 22%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/GlResource.cpp.o
[ 23%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/Joystick.cpp.o
[ 25%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/JoystickManager.cpp.o
[ 26%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/Keyboard.cpp.o
[ 27%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/Mouse.cpp.o
[ 28%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/VideoMode.cpp.o
[ 30%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/Window.cpp.o
[ 31%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/WindowImpl.cpp.o
[ 32%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/Unix/Display.cpp.o
[ 34%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/Unix/GlxContext.cpp.o
[ 35%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/Unix/InputImpl.cpp.o
[ 36%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/Unix/VideoModeImpl.cpp.o
[ 38%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/Unix/WindowImplX11.cpp.o
Linking CXX shared library ../../../lib/libsfml-window.so
[ 38%] Built target sfml-window
Scanning dependencies of target sfml-network
[ 39%] Building CXX object src/SFML/Network/CMakeFiles/sfml-network.dir/Ftp.cpp.o
[ 40%] Building CXX object src/SFML/Network/CMakeFiles/sfml-network.dir/Http.cpp.o
[ 42%] Building CXX object src/SFML/Network/CMakeFiles/sfml-network.dir/IpAddress.cpp.o
[ 43%] Building CXX object src/SFML/Network/CMakeFiles/sfml-network.dir/Packet.cpp.o
[ 44%] Building CXX object src/SFML/Network/CMakeFiles/sfml-network.dir/Socket.cpp.o
[ 46%] Building CXX object src/SFML/Network/CMakeFiles/sfml-network.dir/SocketSelector.cpp.o
[ 47%] Building CXX object src/SFML/Network/CMakeFiles/sfml-network.dir/TcpListener.cpp.o
[ 48%] Building CXX object src/SFML/Network/CMakeFiles/sfml-network.dir/TcpSocket.cpp.o
[ 50%] Building CXX object src/SFML/Network/CMakeFiles/sfml-network.dir/UdpSocket.cpp.o
[ 51%] Building CXX object src/SFML/Network/CMakeFiles/sfml-network.dir/Unix/SocketImpl.cpp.o
Linking CXX shared library ../../../lib/libsfml-network.so
[ 51%] Built target sfml-network
Scanning dependencies of target sfml-graphics
[ 52%] Building CXX object src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/Color.cpp.o
[ 53%] Building CXX object src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/Font.cpp.o
[ 55%] Building CXX object src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/GLCheck.cpp.o
[ 56%] Building CXX object src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/Image.cpp.o
[ 57%] Building CXX object src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/ImageLoader.cpp.o
[ 59%] Building CXX object src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/RenderStates.cpp.o
[ 60%] Building CXX object src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/RenderTexture.cpp.o
[ 61%] Building CXX object src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/RenderTarget.cpp.o
[ 63%] Building CXX object src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/RenderWindow.cpp.o
[ 64%] Building CXX object src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/Shader.cpp.o
[ 65%] Building CXX object src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/Texture.cpp.o
[ 67%] Building CXX object src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/TextureSaver.cpp.o
[ 68%] Building CXX object src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/Transform.cpp.o
[ 69%] Building CXX object src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/Transformable.cpp.o
[ 71%] Building CXX object src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/View.cpp.o
[ 72%] Building CXX object src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/Vertex.cpp.o
[ 73%] Building CXX object src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/Shape.cpp.o
[ 75%] Building CXX object src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/CircleShape.cpp.o
[ 76%] Building CXX object src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/RectangleShape.cpp.o
[ 77%] Building CXX object src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/ConvexShape.cpp.o
[ 78%] Building CXX object src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/Sprite.cpp.o
[ 80%] Building CXX object src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/Text.cpp.o
[ 81%] Building CXX object src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/VertexArray.cpp.o
[ 82%] Building CXX object src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/RenderTextureImpl.cpp.o
[ 84%] Building CXX object src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/RenderTextureImplFBO.cpp.o
[ 85%] Building CXX object src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/RenderTextureImplDefault.cpp.o
Linking CXX shared library ../../../lib/libsfml-graphics.so
[ 85%] Built target sfml-graphics
Scanning dependencies of target sfml-audio
[ 86%] Building CXX object src/SFML/Audio/CMakeFiles/sfml-audio.dir/ALCheck.cpp.o
[ 88%] Building CXX object src/SFML/Audio/CMakeFiles/sfml-audio.dir/AudioDevice.cpp.o
[ 89%] Building CXX object src/SFML/Audio/CMakeFiles/sfml-audio.dir/Listener.cpp.o
[ 90%] Building CXX object src/SFML/Audio/CMakeFiles/sfml-audio.dir/Music.cpp.o
[ 92%] Building CXX object src/SFML/Audio/CMakeFiles/sfml-audio.dir/Sound.cpp.o
[ 93%] Building CXX object src/SFML/Audio/CMakeFiles/sfml-audio.dir/SoundBuffer.cpp.o
[ 94%] Building CXX object src/SFML/Audio/CMakeFiles/sfml-audio.dir/SoundBufferRecorder.cpp.o
[ 96%] Building CXX object src/SFML/Audio/CMakeFiles/sfml-audio.dir/SoundFile.cpp.o
[ 97%] Building CXX object src/SFML/Audio/CMakeFiles/sfml-audio.dir/SoundRecorder.cpp.o
[ 98%] Building CXX object src/SFML/Audio/CMakeFiles/sfml-audio.dir/SoundSource.cpp.o
[100%] Building CXX object src/SFML/Audio/CMakeFiles/sfml-audio.dir/SoundStream.cpp.o
Linking CXX shared library ../../../lib/libsfml-audio.so
[100%] Built target sfml-audio
I don't see any output regarding the joystick.