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

Author Topic: ERROR  (Read 4406 times)

0 Members and 1 Guest are viewing this topic.

FilipCodes

  • Newbie
  • *
  • Posts: 5
    • View Profile
ERROR
« on: October 28, 2016, 11:02:36 am »
I'm using windows 10.
When I try to run examle code I get this error:

||=== Build: Debug in  sfml (compiler: GNU GCC Compiler) ===|
D:\SFML-2.4.0\lib\libsfml-system-s-d.a(String.cpp.obj):C:\Dev\MinGW32-TDM492\lib\gcc\mingw32\4.9.2\include\c++\bits\basic_string.h|324|undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)'|
||error: ld returned 1 exit status|
||=== Build failed: 2 error(s), 0 warning(s) (0 minute(s), 1 second(s)) ===|

please can you help me?  :'( :'( :'(

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10818
    • View Profile
    • development blog
    • Email
Re: ERROR
« Reply #1 on: October 28, 2016, 11:39:01 am »
Are you using the matching compiler? Are you mixing debug and release modes?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

FilipCodes

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: ERROR
« Reply #2 on: November 25, 2016, 12:09:27 am »






FilipCodes

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: ERROR
« Reply #3 on: November 25, 2016, 12:14:41 am »
And now I got error
 ||=== Build: Release in  sfml (compiler: GNU GCC Compiler) ===|
C:\Users\myName\Desktop\file\ sfml\main.cpp||In function 'int main()':|
C:\Users\myName\Desktop\file\ sfml\main.cpp|20|error: 'class sf::RenderWindow' has no member named 'disp1lay'|
||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 1 second(s)) ===|

And program is:
#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.disp1lay();
    }

    return 0;
}
in code block in c++.

Hapax

  • Hero Member
  • *****
  • Posts: 3351
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: ERROR
« Reply #4 on: November 25, 2016, 12:35:51 am »
C:\Users\myName\Desktop\file\ sfml\main.cpp|20|error: 'class sf::RenderWindow' has no member named 'disp1lay'|
        window.disp1lay();
Do you not see what is wrong here? :P

« Last Edit: November 25, 2016, 12:39:08 am by Hapax »
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

FilipCodes

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: ERROR
« Reply #5 on: November 25, 2016, 02:24:36 pm »
||=== Build file: "no target" in "no project" (compiler: unknown) ===|
C:\Users\myName\Desktop\file\ sfml\main.cpp|1|fatal error: SFML/graphics.hpp: No such file or directory|
||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10818
    • View Profile
    • development blog
    • Email
ERROR
« Reply #6 on: November 25, 2016, 02:38:59 pm »
It should be called SFML/Graphics.hpp and you'll have to add the include directory, see the official tutorial and follow it step by step without skipping and without just looking at images.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

FilipCodes

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: ERROR
« Reply #7 on: November 25, 2016, 07:15:59 pm »
still

C:\Users\myName\Desktop\file\ sfml\main.cpp|1|fatal error: SFML/Graphics.hpp: No such file or directory|

jamesL

  • Full Member
  • ***
  • Posts: 124
    • View Profile
Re: ERROR
« Reply #8 on: December 03, 2016, 08:46:59 am »
still

C:\Users\myName\Desktop\file\ sfml\main.cpp|1|fatal error: SFML/Graphics.hpp: No such file or directory|

do you actually have a space in your path before sfml ?
\file\ sfml\


 

anything