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

Author Topic: Compiler error  (Read 921 times)

0 Members and 1 Guest are viewing this topic.

IamAnoob

  • Newbie
  • *
  • Posts: 2
    • View Profile
Compiler error
« on: June 27, 2013, 04:07:03 pm »
I keep getting this error, but I even double check and made sure that the header files are there.

"In file include from /usr/incude/SFML/Window.hpp:40:0;
from /ur/include/SFML/Graphics.h[[:32;
from a.cpp:

/usr/include/SFML/Window/OpenGL.hpp:47:23: fatal error: GL/gl.h: No such file or dorectory
compilation terminated"

Thank you very much for your time.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Compiler error
« Reply #1 on: June 27, 2013, 04:14:42 pm »
It seems like you don't have the OpenGL development files installed.
Laurent Gomila - SFML developer

IamAnoob

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Compiler error
« Reply #2 on: June 27, 2013, 04:59:42 pm »
Thanks that fixed that problem, but now getting a lot of compiler errors.
Code: [Select]
"a.cpp: In function 'int main()';
a.cpp:6.5: error: 'Circleshape' is not a member of 'sf'
a.cpp :6:21: error 'shape' was not declared in this scope
a.cpp:0:19: error 'class sf::RenderWindow' has no member named 'isOpen"
a.cpp:9:19: error 'class sf::RenderWindow; has no member named ;pollEvent'
a.cpp:14:23: error: 'class sf::Event' has no member named 'type'
a.cpp:15:24: error: 'class sf::RenderWindow' has no member named 'close'
a.cpp:18:16: error: 'class sf::RenderWindow' has no member named 'clear'
a.cpp:19:16: error: 'class sf::RenderWindow has no member named 'draw'
a.cpp:20:16: error: 'class sf::RenderWindow' has no member named 'display'"
This is the sample one I tried to compile.
Code: [Select]
#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;
}

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Compiler error
« Reply #3 on: June 27, 2013, 05:07:26 pm »
It seems like you installed SFML 1.6. Note that SFML 2.0 is still not in the Linux repositories.
Laurent Gomila - SFML developer

 

anything