SFML! Is alright...

Pages: 12
Post the full message please.
Blah blah... a tool must not oppose its user... blah blah... wasted time.
I would love to, but my shell caps at 512 lines, and it keeps going. Way to big for this site.


/usr/local/include/SFML/System/Utf.inl:706:25: error: ‘Out sf::Utf<32u>::encodeAnsi’ is not a static member of ‘class sf::Utf<32u>’
/usr/local/include/SFML/System/Utf.inl:706:25: error: template definition of non-template ‘Out sf::Utf<32u>::encodeAnsi’
/usr/local/include/SFML/System/Utf.inl:706:25: error: ‘Uint32’ was not declared in this scope
/usr/local/include/SFML/System/Utf.inl:706:47: error: expected primary-expression before ‘output’
/usr/local/include/SFML/System/Utf.inl:706:55: error: expected primary-expression before ‘char’
/usr/local/include/SFML/System/Utf.inl:706:73: error: expected primary-expression before ‘const’
/usr/local/include/SFML/System/Utf.inl:743:25: error: ‘Out sf::Utf<32u>::encodeWide’ is not a static member of ‘class sf::Utf<32u>’
/usr/local/include/SFML/System/Utf.inl:743:25: error: template definition of non-template ‘Out sf::Utf<32u>::encodeWide’
/usr/local/include/SFML/System/Utf.inl:743:25: error: ‘Uint32’ was not declared in this scope
/usr/local/include/SFML/System/Utf.inl:743:47: error: expected primary-expression before ‘output’
/usr/local/include/SFML/System/Utf.inl:743:55: error: expected primary-expression before ‘wchar_t’
In file included from /usr/local/include/SFML/Window.hpp:35:0,
                 from /usr/local/include/SFML/Graphics.hpp:32,
                 from sfml_test.cpp:2:
/usr/local/include/SFML/Window/Event.hpp:76:9: error: ‘Uint32’ does not name a type
In file included from /usr/local/include/SFML/Window.hpp:40:0,
                 from /usr/local/include/SFML/Graphics.hpp:32,
                 from sfml_test.cpp:2:
/usr/local/include/SFML/Window/Window.hpp:89:54: error: ‘Uint32’ has not been declared
In file included from /usr/local/include/SFML/Window.hpp:40:0,
                 from /usr/local/include/SFML/Graphics.hpp:32,
                 from sfml_test.cpp:2:
/usr/local/include/SFML/Window/Window.hpp:128:59: error: ‘Uint32’ has not been declared
/usr/local/include/SFML/Window/Window.hpp:304:65: error: ‘Uint8’ does not name a type
In file included from /usr/local/include/SFML/Graphics.hpp:34:0,
                 from sfml_test.cpp:2:
/usr/local/include/SFML/Graphics/Color.hpp:62:17: error: expected ‘)’ before ‘red’
/usr/local/include/SFML/Graphics/Color.hpp:80:5: error: ‘Uint8’ does not name a type
/usr/local/include/SFML/Graphics/Color.hpp:81:5: error: ‘Uint8’ does not name a type
/usr/local/include/SFML/Graphics/Color.hpp:82:5: error: ‘Uint8’ does not name a type
/usr/local/include/SFML/Graphics/Color.hpp:83:5: error: ‘Uint8’ does not name a type
In file included from /usr/local/include/SFML/Graphics/Texture.hpp:32:0,
                 from /usr/local/include/SFML/Graphics/Font.hpp:33,
                 from /usr/local/include/SFML/Graphics.hpp:35,
                 from sfml_test.cpp:2:
/usr/local/include/SFML/Graphics/Image.hpp:81:64: error: ‘Uint8’ does not name a type
/usr/local/include/SFML/Graphics/Image.hpp:171:50: error: ‘Uint8’ has not been declared
In file included from /usr/local/include/SFML/Graphics/Texture.hpp:32:0,
                 from /usr/local/include/SFML/Graphics/Font.hpp:33,
                 from /usr/local/include/SFML/Graphics.hpp:35,
                 from sfml_test.cpp:2:
/usr/local/include/SFML/Graphics/Image.hpp:241:11: error: ‘Uint8’ does not name a type
/usr/local/include/SFML/Graphics/Image.hpp:261:17: error: ‘Uint8’ was not declared in this scope
/usr/local/include/SFML/Graphics/Image.hpp:261:22: error: template argument 1 is invalid
/usr/local/include/SFML/Graphics/Image.hpp:261:22: error: template argument 2 is invalid
In file included from /usr/local/include/SFML/Graphics/Texture.hpp:32:0,
                 from /usr/local/include/SFML/Graphics/Font.hpp:33,
                 from /usr/local/include/SFML/Graphics.hpp:35,
                 from sfml_test.cpp:2:
/usr/local/include/SFML/Graphics/Image.hpp:66:92: error: no matching function for call to ‘sf::Color::Color(int, int, int)’
/usr/local/include/SFML/Graphics/Image.hpp:66:92: note: candidates are:
/usr/local/include/SFML/Graphics/Color.hpp:51:5: note: sf::Color::Color()
/usr/local/include/SFML/Graphics/Color.hpp:51:5: note:   candidate expects 0 arguments, 3 provided
/usr/local/include/SFML/Graphics/Color.hpp:40:25: note: sf::Color::Color(const sf::Color&)
/usr/local/include/SFML/Graphics/Color.hpp:40:25: note:   candidate expects 1 argument, 3 provided
In file included from /usr/local/include/SFML/Graphics/Font.hpp:33:0,
                 from /usr/local/include/SFML/Graphics.hpp:35,
                 from sfml_test.cpp:2:
/usr/local/include/SFML/Graphics/Texture.hpp:255:23: error: ‘Uint8’ does not name a type
/usr/local/include/SFML/Graphics/Texture.hpp:277:23: error: ‘Uint8’ does not name a type
/usr/local/include/SFML/Graphics/Texture.hpp:486:5: error: ‘Uint64’ does not name a type
In file included from /usr/local/include/SFML/Graphics.hpp:35:0,
                 from sfml_test.cpp:2:
/usr/local/include/SFML/Graphics/Font.hpp:143:18: error: expected ‘;’ at end of member declaration
/usr/local/include/SFML/Graphics/Font.hpp:143:34: error: expected ‘)’ before ‘codePoint’
/usr/local/include/SFML/Graphics/Font.hpp:161:20: error: ‘Uint32’ has not been declared
/usr/local/include/SFML/Graphics/Font.hpp:161:34: error: ‘Uint32’ has not been declared
/usr/local/include/SFML/Graphics/Font.hpp:232:22: error: ‘Uint32’ was not declared in this scope
/usr/local/include/SFML/Graphics/Font.hpp:232:35: error: template argument 1 is invalid
/usr/local/include/SFML/Graphics/Font.hpp:232:35: error: template argument 3 is invalid
/usr/local/include/SFML/Graphics/Font.hpp:232:35: error: template argument 4 is invalid
/usr/local/include/SFML/Graphics/Font.hpp:264:21: error: ‘Uint32’ has not been declared
In file included from /usr/local/include/SFML/Graphics.hpp:35:0,
                 from sfml_test.cpp:2:
/usr/local/include/SFML/Graphics/Font.hpp:301:25: error: ‘Uint8’ was not declared in this scope
/usr/local/include/SFML/Graphics/Font.hpp:301:30: error: template argument 1 is invalid
/usr/local/include/SFML/Graphics/Font.hpp:301:30: error: template argument 2 is invalid
In file included from /usr/local/include/SFML/Graphics/RenderTexture.hpp:33:0,
                 from /usr/local/include/SFML/Graphics.hpp:39,
                 from sfml_test.cpp:2:
/usr/local/include/SFML/Graphics/RenderTarget.hpp:358:9: error: ‘Uint64’ does not name a type
/usr/local/include/SFML/Graphics/RenderTarget.hpp:70:55: error: no matching function for call to ‘sf::Color::Color(int, int, int, int)’
/usr/local/include/SFML/Graphics/RenderTarget.hpp:70:55: note: candidates are:
/usr/local/include/SFML/Graphics/Color.hpp:51:5: note: sf::Color::Color()
/usr/local/include/SFML/Graphics/Color.hpp:51:5: note:   candidate expects 0 arguments, 4 provided
/usr/local/include/SFML/Graphics/Color.hpp:40:25: note: sf::Color::Color(const sf::Color&)
/usr/local/include/SFML/Graphics/Color.hpp:40:25: note:   candidate expects 1 argument, 4 provided
In file included from /usr/local/include/SFML/Graphics.hpp:40:0,
                 from sfml_test.cpp:2:
/usr/local/include/SFML/Graphics/RenderWindow.hpp:76:60: error: ‘Uint32’ has not been declared
In file included from /usr/local/include/SFML/Graphics.hpp:47:0,
                 from sfml_test.cpp:2:
/usr/local/include/SFML/Graphics/Text.hpp:146:19: error: ‘Uint32’ has not been declared
/usr/local/include/SFML/Graphics/Text.hpp:210:5: error: ‘Uint32’ does not name a type
/usr/local/include/SFML/Graphics/Text.hpp:290:5: error: ‘Uint32’ does not name a type


That's about as much as I can fit.
Last edited on
I would love to, but my shell caps at 25k characters

You can set the scrollback buffer to unlimited in the gnome-terminal settings or something sufficiently large for practical use (>=16,000 lines) or redirect the output to a file. If that is the tail of the output, it's not very useful. The first error messages are the important ones.
Last edited on
Alright here's the first errors.

/tmp/ccYhvDd1.o: In function `main':
sfml_test.cpp:(.text+0x119): undefined reference to `sf::VideoMode::VideoMode(unsigned int, unsigned int, unsigned int)'
sfml_test.cpp:(.text+0x164): undefined reference to `sf::RenderWindow::RenderWindow(sf::VideoMode, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, sf::ContextSettings const&)'
sfml_test.cpp:(.text+0x191): undefined reference to `sf::Texture::Texture()'
sfml_test.cpp:(.text+0x1f6): undefined reference to `sf::Texture::loadFromFile(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, sf::Rect<int> const&)'
sfml_test.cpp:(.text+0x241): undefined reference to `sf::Sprite::Sprite(sf::Texture const&)'
sfml_test.cpp:(.text+0x246): undefined reference to `sf::Font::getDefaultFont()'
sfml_test.cpp:(.text+0x279): undefined reference to `sf::String::String(char const*, std::locale const&)'
sfml_test.cpp:(.text+0x29f): undefined reference to `sf::Text::Text(sf::String const&, sf::Font const&, unsigned int)'
sfml_test.cpp:(.text+0x2d9): undefined reference to `sf::Window::close()'
sfml_test.cpp:(.text+0x2f0): undefined reference to `sf::Window::pollEvent(sf::Event&)'
sfml_test.cpp:(.text+0x300): undefined reference to `sf::Keyboard::isKeyPressed(sf::Keyboard::Key)'
sfml_test.cpp:(.text+0x310): undefined reference to `sf::Window::close()'
sfml_test.cpp:(.text+0x318): undefined reference to `sf::RenderStates::Default'
sfml_test.cpp:(.text+0x332): undefined reference to `sf::RenderTarget::draw(sf::Drawable const&, sf::RenderStates const&)'
sfml_test.cpp:(.text+0x33a): undefined reference to `sf::RenderStates::Default'
sfml_test.cpp:(.text+0x354): undefined reference to `sf::RenderTarget::draw(sf::Drawable const&, sf::RenderStates const&)'
sfml_test.cpp:(.text+0x360): undefined reference to `sf::Window::display()'
sfml_test.cpp:(.text+0x36c): undefined reference to `sf::Window::isOpen() const'
sfml_test.cpp:(.text+0x3a6): undefined reference to `sf::Texture::~Texture()'
sfml_test.cpp:(.text+0x3b2): undefined reference to `sf::RenderWindow::~RenderWindow()'
Last edited on
Well, those are just linker errors, which means it compiled fine.
You need to link the appropriate SFML libraries.
Ah alright got that figured out. To be honest, we've gone past the edge of my knowledge here, so I'm learning as we go along. I made the .o file, then tried linking. Got a ton of pretty much the same error following this:


/usr/bin/ld: warning: libGLEW.so.1.7, needed by /usr/local/SFML-2.0-rc/lib/libsfml-graphics.so, not found (try using -rpath or -rpath-link)


Not sure what the -path and -rpath-link means.

EDIT:
Found a download for libGLEW.so.1.7. Working on making that, ran into errors. Such a pain in the ass.
Last edited on
L B wrote:
My problem with SFML is that the debug DLLs crash and the release DLLs don't even link. Me and two other people have the same problem.


Make that 3.
It's a bad idea to try and collect single .so files, that's rarely going to work.
You need to think in packages. If a distribution does not provide the right version of a library, you should give up or compile it yourself. This ensure that it links to the correct versions of GLEW and other libraries for your distribution. While you can try to collect the right versions of the libraries elsewhere, e.g. here:
http://packages.debian.org/en/sid/amd64/libglew1.7/download

...this usually only ends in trouble (unmet dependencies, conflicts with existing versions etc.).
More importantly, you can't expect users to follow the same procedure when they're trying to install your program. Either all dependencies are satisfied by the distro's repository or they won't bother.
Last edited on
Have you tried installing libglew through the package manager?
Ok ok I got rid of the .so I downloaded and got libglew from the package manager (I guess this while "think in packages" thing was never brought to my attention for *nix).

Anyway, got the libglew issue resolved, but now it's back to SFML issues -_- Similar error followed by a slew of other consequent errors.


/usr/bin/ld: warning: libsfml-window.so.2, needed by /usr/local/SFML-2.0-rc/lib/libsfml-graphics.so, not found (try using -rpath or -rpath-link)


I linked to the correct path, but still no luck.

EDIT:
Trying to link to sfml-window leads to libglew errors again, even though I just installed it via the package manager. This is getting stupid.
Last edited on
The libraries must be located in /usr/local/lib.

even though I just installed it via the package manager.

No point to that if it's not the right version.
Moved libraries to /usr/local/lib. Still errors galore.

No point to that if it's not the right version.

Then what is? I assume 1.7 (due to the suffix in the error) but there is no 1.7 in the package manager. I can decide between 1.4, 1.5, and 1.6. I picked 1.6.
Well, you can try the package I linked. But really, the proper way is to compile SFML yourself.
In theory, the following should work:

1
2
3
4
5
sudo apt-get build-dep libsfml-dev
<cd to the root directory that contains CMakeLists.txt>
cmake -i
make -j4
sudo make install


The good news is that with the latest snapshot, naraku's example no longer compiles due to API changes, as it seems. Good luck!
Last edited on
I started off with just getting libsfml-dev, but since that's dated (somehow, even though it's listed as the current version. But Laurent insists we all use 2.0, but that's just a mess with no real support) I switched to 2.0. I may just grab the source off the repo and compile myself at this point. Though going through and purging everything I have now is gonna be awesome... -_-
Athar wrote:
The good news is that with the latest snapshot, naraku's example no longer compiles due to API changes, as it seems.
Not sure why thats good news, but you only need to create the font and pass it to the sf::text ctor
1
2
3
4
5
 sf::Sprite sprite(texture);
    sf::Font font;
    font.loadFromFile("arial.ttf");

    sf::Text text("Hello SFML", font);
@Naraku,

I'm assuming he was being sarcastic.
Topic archived. No new replies allowed.
Pages: 12