16
General / Re: Having trouble solving SFML linker errors
« on: November 23, 2013, 07:50:23 am »Quote
I've managed to set it up successfully already on my PC running Arch Linuxthat 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
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 $
[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
metulburr@arch ~/Downloads $ ./test
It is in Windows, i have a hell of a time and have yet to compile a successful SFML example.