I figured it out! It was not too hard, all I did was make symbolic links for all the shared libraries like so:
Prototype:
ln -s /usr/lib/SFML/libMODULE-sfml.so.1.6 /usr/lib/SFML/libMODULE-sfml.so
Example:
ln -s /usr/lib/SFML/libgraphics-sfml.so.1.6 /usr/lib/SFML/libgraphics-sfml.so
Then I just added all the directories of /usr/lib/SFML and /usr/lib/SFML16 to ldconfig:
sudo ldconfig /usr/lib/SFML16
You have to do ldconfig every time you switch, so I added it to the script.
If you want the code I have attached the script and test code, compile with...:
g++ -std=c++11 -L /usr/lib/SFML test21.cpp -lsfml-graphics -lsfml-window -lsfml-system
and...
g++ -std=c++11 -L /usr/lib/SFML test16.cpp -lsfml-graphics -lsfml-window -lsfml-system
You can use the script if you put it in /usr/local/bin/sfml_change, and make a link to the bin folder via:
ln -s /usr/local/bin/sfml_change/chsfml.sh /usr/bin/chsfml
So you can run it any time from the command line, to use the script...
Change to SFML 2.1:
chsfml -sfml21
Change to SFML 1.6:
chsfml -sfml16
Clean all links:
chsfml -clean
Help:
chsfml -h
Errors happen every time complaining about symbolic links, unless it does not work (test it first), ignore them.
The files should be set up like so...
SFML library files (taken OUT of the original folders i.e /usr/lib/SFML16/libgraphics-sfml.so.1.6) should go into
/usr/lib/SFML16
/usr/lib/SFML21
SFML header files should go into (taken OUT of original folders, i.e /usr/include/SFMLInclude/SFML16/Graphics.hpp):
/usr/include/SFMLInclude/SFML16
/usr/include/SFMLInclude/SFML21
I might throw this up on github, Il post a link if I do
I hope this helps someone! Peace! :-D