Hello, here is my very simple file SFML.cpp :
#include <iostream>
#include <SFML/System.hpp>
#include <SFML/Graphics.hpp>
using namespace std;
int main(int argc, char **argv)
{
sf::RenderWindow Window(sf::VideoMode(800, 600), "My Window :D");
sf::Texture Sprite;
Window.clear(sf::Color::Black);
Window.display();
return 0;
}
I try to compile it :
g++-4.8 -std=c++11 -o SFML SFML.cpp -Wall -lsfml-graphics -lsfml-window -lsfml-system
And here is what I get :
/tmp/ccg01oFm.o: In function `main':
SFML.cpp:(.text+0x104): undefined reference to `sf::String::String(char const*, std::locale const&)'
SFML.cpp:(.text+0x155): undefined reference to `sf::RenderWindow::RenderWindow(sf::VideoMode, sf::String const&, unsigned int, sf::ContextSettings const&)'
SFML.cpp:(.text+0x182): undefined reference to `sf::Texture::Texture()'
SFML.cpp:(.text+0x19a): undefined reference to `sf::RenderTarget::clear(sf::Color const&)'
SFML.cpp:(.text+0x1a9): undefined reference to `sf::Window::display()'
SFML.cpp:(.text+0x1bd): undefined reference to `sf::Texture::~Texture()'
SFML.cpp:(.text+0x212): undefined reference to `sf::Texture::~Texture()'
collect2: error: ld returned 1 exit status
Would you know how to fix this? Thanks.