Hello,
I recently printed off the instructions for installing SFML and followed them very carefully. I downloaded the full SDK for Linux - 32 bit which (I understood contained everything needed). I followed the instructions for setting codeblocks compiler and linker settings. The first time i attempted to compile the Clock example - I got a message that a shared library was missing.
Now this may be where I started to go wrong.
I used the package manager to download the debian (version 1.6) libsfml-dev, libsfml-network, libsfml-window,libsfml- system,libsfml- graphics libsfml-audio. I recompiled the Clock example and it worked. The problem was that it should have worked without me downloading the debian versions. I studied the tutorial again online and then saw that there was a section on compiling SFML (for advanced users). I ignored it the first time because i do not consider myself to be advanced. But this section stated that the downloaded SDK needed to be compiled. So I did the following:
1. apt-get build-dep libsfml
2. make STATIC = YES # builds the SFML libraries
3. sudo make install # installs the compiled libraries
4. make sfml-samples # compiles the SFML examples
I then attempted to compile a simple program and i am posting only a few relevant lines here:
-----------------------------code-------------------------
#include <SFML/Window.hpp>
int main()
{
// get best fullscreen mode
sf::Window ascreen;
ascreen.Create(sf::VideoMode::GetMode(0), "pacman", sf::Style::Fullscreen);
............................
Now this fails to compile - with excess of 50 errors. I have read previous posts where these errors are identified, but cannot figure out what I am doing wrong. Please note that again I only refer to a few of the errors as they all appear to be from the same problem:
Errors:----------------------------------
/home//SFML-1.6/lib/libsfml-window-s.a(VideoModeSupport.o)||In function sf::priv::VideoModeSupport::GetDesktopVideoMode()':|
VideoModeSupport.cpp|| undefined reference to `XQueryExtension'|
VideoModeSupport.cpp|| undefined reference to `XRRGetScreenInfo'|
VideoModeSupport.cpp|| undefined reference to `XRRConfigCurrentConfiguration'|
VideoModeSupport.cpp|| undefined reference to `XRRConfigSizes'|
VideoModeSupport.cpp|| undefined reference to `XRRFreeScreenConfigInfo'|
ETC........
Please can you advise me on how to correct these errors? I have been trying on my own for over a week to work things out but have made no progress. I would be grateful for any help that you can give me.
Kind Regards