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 - taserman21

Pages: [1]
1
General / Re: Can't Find libsfml-graphics.so.2
« on: March 31, 2016, 01:59:25 am »
Ok, I found the libraries I need to know where to put them. I tried putting them in /usr/lib but that didn't work.

2
General / Re: Can't Find libsfml-graphics.so.2
« on: March 31, 2016, 01:20:06 am »
Where would my libs be installed then?

3
General / Re: Can't Find libsfml-graphics.so.2
« on: March 30, 2016, 09:20:02 pm »
Sorry, I was trying to watch TV and post this and forgot to add the actual error.

4
General / Can't Find libsfml-graphics.so.2
« on: March 30, 2016, 07:37:33 pm »
I am attempting to develop a game and have run into a problem early. I can compile this code but the executable will not run on Linux:

// Main.cpp \\

#include <SFML/Graphics.hpp>

using namespace sf;

int main(int argc, char *argv[])
{
    RenderWindow window(VideoMode(1366, 768), "Time Sheep");
   
    RectangleShape player(Vector2f(200, 200));
   
    while(window.isOpen())
    {
        Event event;
       
        while(window.pollEvent(event))
        {
            if(event.type == Event::Closed)
            {
                window.close();
               
                return 1;
            }
        }
       
        window.clear();
       
        window.draw(player);
       
        window.display();
    }
}

Please help me the other forum posts with this problem don't help.

EDIT: This is what you get when trying to watch TV and make a forum post: forgetting to put the error.
Here it is:
./TimeSheep: error while loading shared libraries: libsfml-graphics.so.2: cannot open shared object file: No such file or directory

5
General / Re: Window Crashes Immediately.
« on: November 07, 2015, 09:41:44 pm »
You're not being very clear. Is the error from the compiler, or is the error from the program?

Also, don't return 0; in the loop. That will close the window (and application).
It comes from the program and I did try to run it without return 0; and that didn't work either.

6
General / Window Crashes Immediately.
« on: November 07, 2015, 09:28:24 pm »
I am trying to learn SFML and tried the first code it shows on the website:
#include <SFML/Graphics.hpp>

int main()
{
        sf::RenderWindow window(sf::VideoMode(1366, 768), "Hello World!");
        sf::CircleShape shape(100.f);
        shape.setFillColor(sf::Color::Blue);

        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;
        }
}
 
After compiling it with g++ -o Hello_World Hello_World.cpp I get:
*** Error in `./Hello_World': free(): invalid pointer: 0x0000000000dfadc8 ***
Aborted (core dumped)
 

Please help me.

Pages: [1]
anything