title: How to run SFML in CLion, Error undefined reference to?
body: <p>I'm new to C++ and try to learn game programming, I choose SFML and run on CLion by Jetbrain and using Ubuntu machine. I following this tutorial <a href="http://sfml-dev.org/tutorials/2.0/start-linux.php" rel="noreferrer">SFML and Linux</a>  here my code :</p>
  
  <pre><code>#include &lt;SFML/Graphics.hpp&gt;
  
  using namespace sf;
  
  int main() {
  
  RenderWindow window(sf::VideoMode(200, 200), "SFML Work!");
  CircleShape shape(100.f);
  shape.setFillColor(Color::Green);
  
  while (window.isOpen()) {
      Event event;
      while (window.pollEvent(event)) {
          if (event.type == Event::Closed) {
              window.close();
          }
      }
  
      window.clear();
      window.draw(shape);
      window.display();
  }
  
  return 0;
  }
  </code></pre>
  
  <p>When I run on CLion it error</p>
  
  <pre><code>CMakeFiles/SFMLBasic.dir/main.cpp.o: In function `main': 
  undefined reference to `sf::String::String(char const*, std::locale const&amp;)'
  undefined reference to `sf::VideoMode::VideoMode(unsigned int, unsigned int, unsigned int)'
  undefined reference to `sf::RenderWindow::RenderWindow(sf::VideoMode, sf::String const&amp;, unsigned int, sf::ContextSettings const&amp;)'
  ...
  undefined reference to `sf::Shape::~Shape()'
  </code></pre>
  
  <p>How I config or setup to run SFML in CLion, I don't know CMAKE can do that? I only run by terminal, <strong>It work if I run this command.</strong></p>
  
  <pre><code>g++ -c main.cpp
  g++ main.o -o sfml-app -lsfml-graphics -lsfml-window -lsfml-system
  ./sfml-app
  </code></pre>
  
  <p>How to config to use all reference variable without do manual every time in Terminal? Thanks.</p>