I've run into an odd problem.
I can't find a solution on google, or here.
When I try to compile the basic tutorial, I get a linker error. I don't think I am missing a library.
This is the error.
Undefined symbols:
"sf::RenderWindow::RenderWindow(sf::VideoMode, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long, sf::ContextSettings const&)", referenced from:
_main in main.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
And this is the code
#include <SFML/Graphics.hpp>
int main()
{
// Create main window
sf::RenderWindow App(sf::VideoMode(640, 480), "SFML Graphics");
// Start game loop
while (App.IsOpened())
{
// Process events
sf::Event Event;
while (App.GetEvent(Event))
{
// Close window : exit
if (Event.Type == sf::Event::Closed)
App.Close();
}
// Clear screen
App.Clear();
// Finally, display the rendered frame on screen
App.Display();
}
return EXIT_SUCCESS;
}
What could it mean and what can I do about it?