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

Pages: [1]
1
Graphics / Re: linking error while building a sfml project
« on: August 05, 2016, 03:10:35 pm »
my code:

#include <SFML/Graphics.hpp>

int main()
{
    sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
    sf::CircleShape shape(100.0);
    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;
}


also note I am using sfml version 2.3.2

2
Graphics / Re: linking error while building a sfml project
« on: August 05, 2016, 12:10:41 pm »
I just ran that now and it shows the same error as before.

3
Graphics / Re: linking error while building a sfml project
« on: August 05, 2016, 11:22:57 am »
my build compiling command is:
g++ -c test.cpp
This runs without any errors and produces a test.o file.

The error shows up when I link the test.o file.
Command:
g++ test.o -o test -lsfml-graphics -lsfml-window -lsfml-system
This command gives the error that i mentioned in the previous post.

BTW thanks for the reply.

4
Graphics / linking error while building a sfml project
« on: August 05, 2016, 09:34:36 am »
hi guys,

I have recently compiled sfml(version 2.3.2) source with gcc/g++(version 4.9.3). Most of it works fine but when I try to build(especially while linking) the program in this http://www.sfml-dev.org/tutorials/2.3/start-linux.php , I get this error:

test.o: In function `main':                                                                                                                                                                     
test.cpp:(.text+0x189): undefined reference to `sf::CircleShape::CircleShape(float, unsigned long)'                                                                                             
collect2: error: ld returned 1 exit status


I have tried reinstalling sfml, but the problem still exists.Also I am on linux mint 17.3(64-bit).
Please, can anyone tell how to solve this problem.

I am sorry for the bad formatting and thanks in advance.


Pages: [1]