I've managed to set it up successfully already on my PC running Arch Linux
that is easy, as SFML 2.1 and SFML 1.6 are both in the AUR.
metulburr@arch ~/$ pacaur -Ss sfml
community/sfml 2.1-1 [installed]
A simple, fast, cross-platform, and object-oriented multimedia API
aur/sfml1.6 1.6-6 (15)
A simple, fast, cross-platform, and object-oriented multimedia API
In ubuntu the method i use is just coping from the extracted sfml file to /usr
metulburr@ubuntu ~/Downloads/SFML-2.1 $ sudo cp -r include/SFML /usr/include
[sudo] password for metulburr:
metulburr@ubuntu ~/Downloads/SFML-2.1 $ sudo cp -r lib/* /usr/lib
metulburr@ubuntu ~/Downloads/SFML-2.1 $ sudo cp -r share/SFML /usr/share
metulburr@ubuntu ~/Downloads/SFML-2.1 $
and in my IDE's i execute:
g++ -std=c++11 -Wall -o "%e" "%f" -lsfml-audio -lsfml-graphics -lsfml-window -lsfml-system &&"./%e"
or via terminal:
metulburr@arch ~/Downloads $ g++ -std=c++11 test.cpp -o test -lsfml-audio -lsfml-graphics -lsfml-window -lsfml-system
metulburr@arch ~/Downloads $ ./test
It is in Windows, i have a hell of a time and have yet to compile a successful SFML example.
i get a g++.exe/cc1plus.exe/etc. No disk error when using the latest mingw. This led me to believe there was something wrong with the latest mingw based on some forums who said to get a different version. I am not sure how exactly as their website has no previous versions. I prefer cygwin, as then i have access to bash commands in wins command prompt, but SFML complained that it was the wrong type of operating system if i attempt to compile it with cygwin's gcc/g++.
C:\Users\micah_000>g++ -std=c++11 test.cpp -IC:\SFML-2.1\include -LC:\SFML-2.1\l
ib -o test -lsfml-audio -lsfml-system -lsfml-window -lsfml-graphics
cygwin warning:
MS-DOS style path detected: C:\SFML-2.1\include
Preferred POSIX equivalent is: /cygdrive/c/SFML-2.1/include
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
In file included from C:\SFML-2.1\include/SFML/System.hpp:32:0,
from C:\SFML-2.1\include/SFML/Window.hpp:32,
from C:\SFML-2.1\include/SFML/Graphics.hpp:32,
from test.cpp:1:
C:\SFML-2.1\include/SFML/Config.hpp:65:6: error: #error This operating system is
not supported by SFML library
#error This operating system is not supported by SFML library
^
In file included from C:\SFML-2.1\include/SFML/Window.hpp:40:0,
from C:\SFML-2.1\include/SFML/Graphics.hpp:32,
from test.cpp:1:
C:\SFML-2.1\include/SFML/Window/Window.hpp:105:34: error: expected `)' before `h
andle'
explicit Window(WindowHandle handle, const ContextSettings& settings = Cont
extSettings());
^
C:\SFML-2.1\include/SFML/Window/Window.hpp:141:17: error: `WindowHandle' has not
been declared
void create(WindowHandle handle, const ContextSettings& settings = ContextS
ettings());
^
C:\SFML-2.1\include/SFML/Window/Window.hpp:424:5: error: `WindowHandle' does not
name a type
WindowHandle getSystemHandle() const;
^
In file included from C:\SFML-2.1\include/SFML/Graphics.hpp:40:0,
from test.cpp:1:
C:\SFML-2.1\include/SFML/Graphics/RenderWindow.hpp:93:40: error: expected `)' be
fore `handle'
explicit RenderWindow(WindowHandle handle, const ContextSettings& settings
= ContextSettings());
^
C:\Users\micah_000>
So then i just stole code blocks mingw and copied it over to c:\ to use instead. This at least successfully compiles. However running the program resusts in the error:
the procedure entry point __gxx_personality_v0 could not be located in the dynamic link library C:\SFML-2.1\bin\sfml-graphics-2.dll
with the command:
C:\Users\micah_000>g++ -std=c++11 test.cpp -IC:\SFML-2.1\include -LC:\SFML-2.1\l
ib -o test -lsfml-audio -lsfml-graphics -lsfml-window -lsfml-system
and i am not quite sure what that means. After how easy it is to install in any linux distro i find it quite absurd the process in windows.
EDIT:
oh ok so i came across that code blocks mingw needs sfml TDM. Which now it runs in windows. So in that case is there a version that would run by cygwin's gcc/g++?
Sorry OP, i didn't mean to hijack your thread.