News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Use of SFML and dependensies

Started by dkaip, January 30, 2010, 10:47:09 PM

Previous topic - Next topic

dkaip

In main graphics start up program with codeblocks in build options, in other linker options must put -lsfml-system and in search directories>linker must take the C:\SFML-1.5\lib\mingw directory, and in the compiler stettings>#defines must put SFML_DYNAMIC.
In the program directory must put the sfml-system.dll file to work the program.
-------------------------------------
Now i implement with ...


    sf::Font font;
    std::string file = OpenFile( "Arial.ttf" );
    font.LoadFromMemory( file.c_str( ), file.length( ) );


I have the graphics.hpp and i dont know what settings must i do.
Thank's
Jim

#include <SFML/System.hpp>
#include <SFML/graphics.hpp>
#include <iostream>

int main()
{
    sf::Font font;
    std::string file = OpenFile( "Arial.ttf" );
    font.LoadFromMemory( file.c_str( ), file.length( ) );
    sf::Clock Clock;
    while (Clock.GetElapsedTime() < 5.f)
    {
        std::cout << Clock.GetElapsedTime() << std::endl;
        sf::Sleep(0.5f);
    }

    return 0;
}