Hi, i recently wanted to try out SFML 2.4. I am currently using Linux (Fedora 24/Korora 24).
SFML 2.4 is not in the repositorys yet, so I downloaded "GCC - 64-bit" from the download page
and stored it in my Documents folder, after i extracted it.
So that's the command:
g++ Test.cpp -I ~/Dokumente/C++/SFML-2.4.0/include/ -L ~/Dokumente/C++/SFML-2.4.0/lib -lsfml-graphics -lsfml-window -lsfml-system
That's the output:
/usr/bin/ld: warning: libjpeg.so.8, needed by /home/DasOhmoff/Dokumente/C++/SFML-2.4.0/lib/libsfml-graphics.so, not found (try using -rpath or -rpath-link)
/home/DasOhmoff/Dokumente/C++/SFML-2.4.0/lib/libsfml-graphics.so: undefined reference to `jpeg_std_error@LIBJPEG_8.0'
/home/DasOhmoff/Dokumente/C++/SFML-2.4.0/lib/libsfml-graphics.so: undefined reference to `jpeg_set_defaults@LIBJPEG_8.0'
/home/DasOhmoff/Dokumente/C++/SFML-2.4.0/lib/libsfml-graphics.so: undefined reference to `jpeg_start_compress@LIBJPEG_8.0'
/home/DasOhmoff/Dokumente/C++/SFML-2.4.0/lib/libsfml-graphics.so: undefined reference to `jpeg_set_quality@LIBJPEG_8.0'
/home/DasOhmoff/Dokumente/C++/SFML-2.4.0/lib/libsfml-graphics.so: undefined reference to `jpeg_stdio_dest@LIBJPEG_8.0'
/home/DasOhmoff/Dokumente/C++/SFML-2.4.0/lib/libsfml-graphics.so: undefined reference to `jpeg_finish_compress@LIBJPEG_8.0'
/home/DasOhmoff/Dokumente/C++/SFML-2.4.0/lib/libsfml-graphics.so: undefined reference to `jpeg_CreateCompress@LIBJPEG_8.0'
/home/DasOhmoff/Dokumente/C++/SFML-2.4.0/lib/libsfml-graphics.so: undefined reference to `jpeg_destroy_compress@LIBJPEG_8.0'
/home/DasOhmoff/Dokumente/C++/SFML-2.4.0/lib/libsfml-graphics.so: undefined reference to `jpeg_write_scanlines@LIBJPEG_8.0'
collect2: Fehler: ld gab 1 als Ende-Status zurück
Folder content:
[17:55 DasOhmoff ~/Dokumente/C++]$ ls -a
. .. SFML-2.4.0 Test.cpp
Test.cpp file:
#include <SFML/Graphics.hpp>
int main()
{
sf::Texture txtr;
sf::Sprite sprt;
txtr.loadFromFile("test.png");
sprt.setTexture(txtr);
sf::RenderWindow window(sf::VideoMode(1280, 720), "Test");
sf::Event event;
while(window.isOpen())
{
while(window.pollEvent(event))
{
if(event.type == sf::Event::Closed)
window.close();
}
window.clear();
window.draw(sprt);
window.display();
}
return 0;
}