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

Pages: [1]
1
General / Re: Symbol Has Different Size?
« on: November 14, 2014, 05:13:34 pm »
So I grabbed the 2.1 version from the downloads page here. I suppose that isn't the same as the version on github.

My "different size" issues has gone away as has my need to use -L but I still have to -ludev.

Could I be a bit of a pest and ask how I go about building it from the github version? All of the tutorials I've found involve using windows and installing it in a non-standard directory.

Thanks for your help!

2
General / Re: Symbol Has Different Size?
« on: November 14, 2014, 12:30:17 am »
Okay, so reinstall it now I've deleted the old libraries?

Out of curiosity, why do I have to specify the -L /usr/lib tag and -ludev, I haven't seen those in any other code. As a linux build, shouldn't it check /usr/lib by default or do I need to install it somewhere else too ? (I'm running 64 bit if that makes a difference)

3
General / Symbol Has Different Size?
« on: November 13, 2014, 09:58:59 pm »
Hello there, I've been struggling to get SFML working for a little while now.

I have installed SFML 2.0 on OpenSUSE 13.1

I tried this simple test code:

Code: [Select]
#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 tried to compile with
Code: [Select]
g++ sfml.cpp -o sfml-app -L/usr/lib -lsfml-graphics -lsfml-window -lsfml-system
but this gave lots of undefined reference errors:
Code: [Select]
/tmp/ccAD24QA.o: In function `main':
sfml.cpp:(.text+0xeb): undefined reference to `sf::String::String(char const*, std::locale const&)'
sfml.cpp:(.text+0x12d): undefined reference to `sf::RenderWindow::RenderWindow(sf::VideoMode, sf::String const&, unsigned int, sf::ContextSettings const&)'
sfml.cpp:(.text+0x161): undefined reference to `sf::CircleShape::CircleShape(float, unsigned int)'
sfml.cpp:(.text+0x175): undefined reference to `sf::Shape::setFillColor(sf::Color const&)'
sfml.cpp:(.text+0x195): undefined reference to `sf::Window::close()'
sfml.cpp:(.text+0x1ae): undefined reference to `sf::Window::pollEvent(sf::Event&)'
sfml.cpp:(.text+0x1ed): undefined reference to `sf::RenderTarget::clear(sf::Color const&)'
sfml.cpp:(.text+0x204): undefined reference to `sf::RenderStates::Default'
sfml.cpp:(.text+0x20f): undefined reference to `sf::RenderTarget::draw(sf::Drawable const&, sf::RenderStates const&)'
sfml.cpp:(.text+0x21e): undefined reference to `sf::Window::display()'
sfml.cpp:(.text+0x22d): undefined reference to `sf::Window::isOpen() const'
/tmp/ccAD24QA.o: In function `sf::CircleShape::~CircleShape()':
sfml.cpp:(.text._ZN2sf11CircleShapeD2Ev[_ZN2sf11CircleShapeD5Ev]+0x13): undefined reference to `vtable for sf::CircleShape'                                                                                                                                                   
sfml.cpp:(.text._ZN2sf11CircleShapeD2Ev[_ZN2sf11CircleShapeD5Ev]+0x1f): undefined reference to `vtable for sf::CircleShape'                                                                                                                                                   
collect2: error: ld returned 1 exit status

So I added -ludev and it compiled fine, but now when it runs I get this error:
Code: [Select]
Symbol `_ZN2sf12RenderStates7DefaultE' has different size in shared object, consider re-linking
I have already tried removing libsfml1_6 and sfml-devel using zypper remove but this doesn't seem to fix the problem and I have no idea what to do or how to "relink" the executables.

Any help?

Pages: [1]
anything