Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - man with shell

Pages: [1]
1
General / Help understanding the tutorials?
« on: March 14, 2012, 05:34:55 am »
The tutorials are extremely unhelpful and unclear. Is it possible someone could write a coherent expanation of how to install SFML for use with Code::Blocks?

For an example of the uselessness of the tutorial, note this line:

"If you linked against the dynamic versions of the SFML libraries, donc forget to copy the corresponding DLLs (sfml-system.dll in this case) to your executable's directory, or to a directory contained in the PATH environment variable."

My executable's directory? I haven't made an executable yet; first I have to have code that compiles, THEN I have an executable. And what is this "PATH environment variable"?

Tutorials are supposed to be written for people who don't already know these things.

At present, I believe I have followed the tutorial as well as I can. I have added the "lib" and "include" directories under the "Search Directories" tab, and I have added the item "-lsfml-system-s" to the "Other linker options" list in the "Project build options" window. I used "-s" because I did not understand the instructions for using the dynamic libraries.

The code of my project in its entirety:

Code: [Select]
#include <SFML/System.hpp>
#include <iostream>

int main()
{
    sf::Clock Clock;
    while (Clock.GetElapsedTime() < 5.f)
    {
        std::cout << Clock.GetElapsedTime() << std::endl;
        sf::Sleep(0.5f);
    }

    return 0;
}



The errors:
Quote
undefined reference to `sf::Clock::GetElapsedTime() const
undefined reference to `sf::Sleep(float)
undefined reference to `sf::Clock::GetElapsedTime() const
undefined reference to `sf::Clock::Clock()


Please help?

Pages: [1]