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

Pages: [1]
1
General / It doesnt work to build the example (Linux, Codeblocks)
« on: July 21, 2013, 01:04:34 pm »
Hi,
The Code:
#include <SFML/Graphics.hpp>
#include <iostream>

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;
}
 

The Error:
Quote
obj/Debug/main.o||In function `main':|
/home/ternes3/Projekte/The Game/main.cpp|6|undefined reference to `sf::String::String(char const*, std::locale const&)'|
/home/ternes3/Projekte/The Game/main.cpp|6|undefined reference to `sf::RenderWindow::RenderWindow(sf::VideoMode, sf::String const&, unsigned int, sf::ContextSettings const&)'|
/home/ternes3/Projekte/The Game/main.cpp|7|undefined reference to `sf::CircleShape::CircleShape(float, unsigned int)'|
/home/ternes3/Projekte/The Game/main.cpp|8|undefined reference to `sf::Shape::setFillColor(sf::Color const&)'|
/home/ternes3/Projekte/The Game/main.cpp|16|undefined reference to `sf::Window::close()'|
/home/ternes3/Projekte/The Game/main.cpp|13|undefined reference to `sf::Window::pollEvent(sf::Event&)'|
/home/ternes3/Projekte/The Game/main.cpp|19|undefined reference to `sf::RenderTarget::clear(sf::Color const&)'|
/home/ternes3/Projekte/The Game/main.cpp|20|undefined reference to `sf::RenderStates::Default'|
/home/ternes3/Projekte/The Game/main.cpp|20|undefined reference to `sf::RenderTarget::draw(sf::Drawable const&, sf::RenderStates const&)'|
/home/ternes3/Projekte/The Game/main.cpp|21|undefined reference to `sf::Window::display()'|
/home/ternes3/Projekte/The Game/main.cpp|10|undefined reference to `sf::Window::isOpen() const'|
obj/Debug/main.o||In function `sf::CircleShape::~CircleShape()':|
/usr/include/x86_64-linux-gnu/SFML/Graphics/CircleShape.hpp|41|undefined reference to `vtable for sf::CircleShape'|
/usr/include/x86_64-linux-gnu/SFML/Graphics/CircleShape.hpp|41|undefined reference to `vtable for sf::CircleShape'|
||=== Build finished: 13 errors, 0 warnings (0 minutes, 0 seconds) ===|

My Settings in at Attachments

Pages: [1]
anything