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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - guizadin

Pages: [1]
1
Okay, I'll try that , thanks!

2
I used this at terminal
 
sudo apt-get install libsfml-dev

How can I fix that?
Thanks!

3
General / g++ Compiling error with terminal - First time linux user
« on: May 17, 2013, 09:14:41 pm »
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!



Pages: [1]
anything