SFML community forums

Help => General => Topic started by: Bicepz on March 17, 2011, 10:19:05 am

Title: Installation VS 2008 Issue
Post by: Bicepz on March 17, 2011, 10:19:05 am
I'm trying to install SFML. I've been working over the tutorial for quite some time and can not figure out why my library is not being installed.

I went through and added the path of sfml lib and include to vs VC++ directories / libraries

I also added the sfml library to my projects linker input but it still returns

Cannot open include file: 'SFML/Window.hpp': No such file or directory

here is the code



Code: [Select]
#include "stdafx.h"
#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;
}


I'm new to VS. Is there something I am doing wrong? I've tried putting all the dll's in my projects directories and it still wont work.
Title: Installation VS 2008 Issue
Post by: Laurent on March 17, 2011, 10:22:21 am
This code doesn't include Window.hpp. What's inside stdafx.h?
Title: Installation VS 2008 Issue
Post by: Bicepz on March 17, 2011, 10:37:12 am
Nothing, its just the default header file that's created with win32 console apps.
Title: Installation VS 2008 Issue
Post by: Laurent on March 17, 2011, 10:38:26 am
So you can't have this error with this code. Are you really sure that it says "Window.hpp" and not "System.hpp"?
Title: Installation VS 2008 Issue
Post by: Bicepz on March 17, 2011, 10:41:42 am
Oh I had an include for the window as well just testing if it would work. It did not. But this code gives the same error for System.hpp.
Title: Installation VS 2008 Issue
Post by: Laurent on March 17, 2011, 10:43:15 am
Ok. There's something you did wrong, follow the tutorial again and make sure that you did exactly what's explained, with the help of screenshots.