SFML problem

Hi all,

I have some trouble to get SFML working. I am using the Code::Blocks IDE.
Tried the following:

1. unzipped SFML-1.6 into c:\SFML-1.6

2. In Code::Blocks: Global Compiler Settings ->SearchDirectories->Compiler-> c:\SFML-1.6\include

3. Project->BuildOptions->Debug->LinkerSettings->sfml-graphics-d, sfml-window-d, sfml-system-d

4. Project->BuildOptions->Release->sfml-graphics, sfml-window, sfml-system

5. path variable in Windows set to path: c:\SFML-1.6\lib

Typed in the sample code:


#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;
}


Still getting the error message "sfml-system.dll is missing". Static linking gives the same error.

I suppose it is some obvious mistake I am making here, but I hope someone can help.
closed account (D80DSL3A)
I'm replying because no one else has. I wish I had a solution for you but I gave up trying to solve that problem long ago.

I have been using a workaround. I copy the needed dlls into each project folder.
This turns out to be useful if you want to send the program to another person.

I keep a text file with these instructions in it:


Steps for creating an SFML project in Code Blocks

1) Create an empty console project

select: Project -> Build Options:
1) choose release

3) compiler settings ->#defines
type:
SFML_DYNAMIC

4) Linker Settings -> other linker options
type:
-lsfml-graphics
-lsfml-window
-lsfml-system


To eliminate the console window:
select: Project -> properties -> Build targets -> Type
from drop down list select: GUI application

dlls needed for dynamic version

From MinGw:
libgcc_s_dw2-1.dll
libstdc++-6.dll

From SFML libs:
sfml-graphics.dll
sfml-window.dll
sfml-system.dll


The part about eliminating the console window applies only if you're writing a windows program though.
Thanks for the reply. Meanwhile I've found a nice tutorial on youtube.

http://www.youtube.com/watch?v=sgLqziVwey4

After following the instructions the sample with the system clock works. But I also had to copy the .dll into the .exe folder. Anyway I am happy that it works now!
Topic archived. No new replies allowed.