Hello Guys!
So, I just installed linux ubuntu 13.04 and I'm having problems when trying to compile.
I followed all the steps at the SFML tutorial for linux and I'm getting some compiling problems, I tried different things, like using code::blocks and also geany, but still, having problems.
Here's what I'm trying to compile:
#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;
}
Now, here's what's happening... At the terminal I use dir>cd Desktop, cause my main.cpp file is there, and after that I use the g++ -c main.cpp and here are the errors I'm getting:
main.cpp: In function ‘int main()’:
main.cpp:6:5: error: ‘CircleShape’ is not a member of ‘sf’
main.cpp:6:21: error: expected ‘;’ before ‘shape’
main.cpp:7:5: error: ‘shape’ was not declared in this scope
main.cpp:9:19: error: ‘class sf::RenderWindow’ has no member named ‘isOpen’
main.cpp:12:23: error: ‘class sf::RenderWindow’ has no member named ‘pollEvent’
main.cpp:14:23: error: ‘class sf::Event’ has no member named ‘type’
main.cpp:15:24: error: ‘class sf::RenderWindow’ has no member named ‘close’
main.cpp:18:16: error: ‘class sf::RenderWindow’ has no member named ‘clear’
main.cpp:19:16: error: ‘class sf::RenderWindow’ has no member named ‘draw’
main.cpp:20:16: error: ‘class sf::RenderWindow’ has no member named ‘display’
I tried looking at the forums but found nothing, so if anyone could help me, that would be really great!
As I said, it's my first time using linux so sorry if I'm being dumb...
Anyways, thanks!