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

Pages: [1]
1
General / Re: SFML project not building. (CodeBlocks)
« on: May 27, 2013, 10:41:20 pm »
I've linked:
sfml-graphics-s
sfml-window-s
sfml-audio-s
sfml-system-s

And I didn't see anyone with the exact errors..must have not been looking hard enough :/ sorry.
nonetheless I still need help getting this fixed...

2
General / SFML project not building. (CodeBlocks)
« on: May 27, 2013, 10:24:22 pm »
So, I'm yet another CodeBlocks user who is having trouble...
I've looked through the forums and I don't see anyone having the same problem though.

I've followed along with this tutorial: http://www.sfml-dev.org/tutorials/2.0/start-cb.php
completely, I've even tried switching to using static SFML.

I'm using the exact code from the tutorial:
#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;
}
 

I get the following errors:
obj\Debug\src\main.o||In function `main':|
C:\Users\Ryan\CPP Projects\b0x3l\src\main.cpp|5|undefined reference to `sf::String::String(char const*, std::locale const&)'|
C:\Users\Ryan\CPP Projects\b0x3l\src\main.cpp|5|undefined reference to `sf::VideoMode::VideoMode(unsigned int, unsigned int, unsigned int)'|
C:\Users\Ryan\CPP Projects\b0x3l\src\main.cpp|5|undefined reference to `sf::RenderWindow::RenderWindow(sf::VideoMode, sf::String const&, unsigned int, sf::ContextSettings const&)'|
C:\Users\Ryan\CPP Projects\b0x3l\src\main.cpp|6|undefined reference to `sf::CircleShape::CircleShape(float, unsigned int)'|
C:\Users\Ryan\CPP Projects\b0x3l\src\main.cpp|7|undefined reference to `sf::Color::Green'|
C:\Users\Ryan\CPP Projects\b0x3l\src\main.cpp|7|undefined reference to `sf::Shape::setFillColor(sf::Color const&)'|
C:\Users\Ryan\CPP Projects\b0x3l\src\main.cpp|15|undefined reference to `sf::Window::close()'|
C:\Users\Ryan\CPP Projects\b0x3l\src\main.cpp|12|undefined reference to `sf::Window::pollEvent(sf::Event&)'|
C:\Users\Ryan\CPP Projects\b0x3l\src\main.cpp|18|undefined reference to `sf::Color::Color(unsigned char, unsigned char, unsigned char, unsigned char)'|
C:\Users\Ryan\CPP Projects\b0x3l\src\main.cpp|18|undefined reference to `sf::RenderTarget::clear(sf::Color const&)'|
C:\Users\Ryan\CPP Projects\b0x3l\src\main.cpp|19|undefined reference to `sf::RenderStates::Default'|
C:\Users\Ryan\CPP Projects\b0x3l\src\main.cpp|19|undefined reference to `sf::RenderTarget::draw(sf::Drawable const&, sf::RenderStates const&)'|
C:\Users\Ryan\CPP Projects\b0x3l\src\main.cpp|20|undefined reference to `sf::Window::display()'|
C:\Users\Ryan\CPP Projects\b0x3l\src\main.cpp|9|undefined reference to `sf::Window::isOpen() const'|
C:\Users\Ryan\CPP Projects\b0x3l\src\main.cpp|23|undefined reference to `sf::RenderWindow::~RenderWindow()'|
C:\Users\Ryan\CPP Projects\b0x3l\src\main.cpp|5|undefined reference to `sf::RenderWindow::~RenderWindow()'|
C:\Users\Ryan\CPP Projects\b0x3l\src\main.cpp|23|undefined reference to `sf::RenderWindow::~RenderWindow()'|
obj\Debug\src\main.o||In function `ZN2sf11CircleShapeD1Ev':|
C:\Program Files (x86)\CodeBlocks\SFML\include\SFML\Graphics\CircleShape.hpp|41|undefined reference to `vtable for sf::CircleShape'|
C:\Program Files (x86)\CodeBlocks\SFML\include\SFML\Graphics\CircleShape.hpp|41|undefined reference to `vtable for sf::CircleShape'|
C:\Program Files (x86)\CodeBlocks\SFML\include\SFML\Graphics\CircleShape.hpp|41|undefined reference to `sf::Shape::~Shape()'|
||=== Build finished: 20 errors, 0 warnings (0 minutes, 0 seconds) ===|
 

I'm using:
CodeBlocks 12.11 (using inbuilt MinGW)
Windows 7 Home Premium x64
static SFML, set up how the tutorial said to (Same errors occur under dynamic)

Pages: [1]