I've recently moved to ubuntu from windows, in windows I could get SFML working but I can't seem to get it working in ubuntu, I'm pretty sure I made it [sfml 2.0] properly so it must be a linker/compiler problem.
I'm using codeblocks.
I'm trying to compile this:
#include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow Window(sf::VideoMode(800, 600, 32), "SFML Sample Application");
while (Window.IsOpen())
{
sf::Event Event;
while (Window.PollEvent(Event))
{
switch (Event.Type)
{
case sf::Event::Closed:
Window.Close();
break;
default:
break;
}
}
Window.Clear(sf::Color(0, 255, 255));
Window.Display();
}
return 0;
}
with static libraries, in settings>compiler>global compiler>search directories>compiler I have "/home/z/Programming/sfml2/include" and in settings>compiler>global compiler>search directories>linker I have "/home/z/Programming/sfml2/lib", in settings>compiler>global compiler>compiler settings>#defines I have "SFML_STATIC".
then in my project build options, I have this in debug>linker settings>link libraries
sfml-graphics-s-d
sfml-audio-s-d
sfml-window-s-d
sfml-network-s-d
sfml-system-s-d
and I have this in release>linker settings>link libraries
sfml-graphics-s
sfml-audio-s
sfml-window-s
sfml-network-s
sfml-system-s
Am I missing something? these are the errors I'm getting:
/media/Storage/Programming/C++/Real Projects/SFML/SFML START 1[LINUX]/main.cpp||In function ‘int main()’:|
/media/Storage/Programming/C++/Real Projects/SFML/SFML START 1[LINUX]/main.cpp|7|error: ‘class sf::RenderWindow’ has no member named ‘IsOpen’|
/media/Storage/Programming/C++/Real Projects/SFML/SFML START 1[LINUX]/main.cpp|10|error: ‘class sf::RenderWindow’ has no member named ‘PollEvent’|
/media/Storage/Programming/C++/Real Projects/SFML/SFML START 1[LINUX]/main.cpp|12|error: ‘class sf::Event’ has no member named ‘Type’|
/media/Storage/Programming/C++/Real Projects/SFML/SFML START 1[LINUX]/main.cpp|15|error: ‘class sf::RenderWindow’ has no member named ‘Close’|
/media/Storage/Programming/C++/Real Projects/SFML/SFML START 1[LINUX]/main.cpp|22|error: ‘class sf::RenderWindow’ has no member named ‘Clear’|
/media/Storage/Programming/C++/Real Projects/SFML/SFML START 1[LINUX]/main.cpp|23|error: ‘class sf::RenderWindow’ has no member named ‘Display’|
||=== Build finished: 6 errors, 0 warnings ===|