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

Author Topic: Problem running first SFML program  (Read 1417 times)

0 Members and 1 Guest are viewing this topic.

mysticalOso

  • Newbie
  • *
  • Posts: 2
    • View Profile
Problem running first SFML program
« on: August 17, 2013, 07:23:47 pm »
Hello,

I am trying to setup SFML in windows using Eclipse CDT with MinGW

I have included smlf/include added appropriate libraries and dlls and the application builds successfully

However on running the application I get the following runtime error:

Can't find a source file at "D:\developpement\sfml\sfml\src\SFML\Window\Window.cpp"
Locate the file or edit the source lookup path to include its location.

I don't know why it's even looking in this directory as there is no reference to it anywhere in my system.

Any help would be hugely appreciated. Many thanks.

here is the source code I'm trying to run:

#include <SFML/Graphics.hpp>

int main()
{
    sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
    sf::CircleShape shape(100.f);
    shape.setFillColor(sf::Color::Green);

    while (window.isOpen())
    {
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed)
                window.close();
        }

        window.clear();
        window.draw(shape);
        window.display();
    }

    return 0;
}

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: Problem running first SFML program
« Reply #1 on: August 17, 2013, 11:58:01 pm »
Can you provide a picture of that error, because my bet is, that it isn't a runtime error, but some error of Eclipse. If your application builds correctly, then it will not need any source file at runtime. I rather think that Eclipse is trying to parse some file and fails doing so. Also does your application crash because of this, or what is happening with the application?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

mysticalOso

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Problem running first SFML program
« Reply #2 on: August 18, 2013, 12:39:59 am »
I get the error if I run in debug mode. If I run with debug SMFL.exe has stopped working dialog appears. Also if I try to run the exe's in the examples they don't work either.

If I run with static libraries I get a similar error except it now says:

Can't find a source file at "d:/programmes/mingw32-4.7/bin/../lib/gcc/mingw32/4.7.2/include/c++/bits/basic_string.h"
Locate the file or edit the source lookup path to include its location.

The VC++ version does work but I'd rather use eclipse if possible.

Thanks so much for your help.

(image attached)

 

anything