1. Using Codebloks 12.11 and SFML 1.6 and the tutorial -->
here, everything looks fine but when I to compile the sample.
#include <SFML/System.hpp>
#include <iostream>
int main()
{
sf::Clock Clock;
while (Clock.GetElapsedTime() < 5.f)
{
std::cout << Clock.GetElapsedTime() << std::endl;
sf::Sleep(0.5f);
}
return 0;
}
I get segfaults. Windows terminates the program.
2. I downloaded SFML 2.0 went over the other tutorial -->
here and then running the sample:
#include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
sf::CircleShape shape(100.f);
shape.setFillColor(sf::Color::Green);
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
}
window.clear();
window.draw(shape);
window.display();
}
return 0;
}
I get numerous build errors.
3. I downloaded Cmake and SFML2.0 and then followed the instructions -->
here, I get it to compile up to 94% before getting a bunch or errors.
This is simply not working for me every way I turn it.
[ 94%] Building CXX object src/SFML/Audio/CMakeFiles/sfml-audio.dir/SoundFile.cp
p.obj
D:\ThomasAn\A0_Appl\S00_Programming\SFML-2.0\src\SFML\Audio\SoundFile.cpp: In me
mber function 'bool sf::priv::SoundFile::openWrite(const string&, unsigned int,
unsigned int)':
D:\ThomasAn\A0_Appl\S00_Programming\SFML-2.0\src\SFML\Audio\SoundFile.cpp:199:48
: error: 'SF_FORMAT_OGG' was not declared in this scope
D:\ThomasAn\A0_Appl\S00_Programming\SFML-2.0\src\SFML\Audio\SoundFile.cpp:199:64
: error: 'SF_FORMAT_VORBIS' was not declared in this scope
D:\ThomasAn\A0_Appl\S00_Programming\SFML-2.0\src\SFML\Audio\SoundFile.cpp: In st
atic member function 'static int sf::priv::SoundFile::getFormatFromFilename(cons
t string&)':
D:\ThomasAn\A0_Appl\S00_Programming\SFML-2.0\src\SFML\Audio\SoundFile.cpp:303:41
: error: 'SF_FORMAT_WVE' was not declared in this scope
D:\ThomasAn\A0_Appl\S00_Programming\SFML-2.0\src\SFML\Audio\SoundFile.cpp:304:41
: error: 'SF_FORMAT_OGG' was not declared in this scope
D:\ThomasAn\A0_Appl\S00_Programming\SFML-2.0\src\SFML\Audio\SoundFile.cpp:305:41
: error: 'SF_FORMAT_MPC2K' was not declared in this scope
D:\ThomasAn\A0_Appl\S00_Programming\SFML-2.0\src\SFML\Audio\SoundFile.cpp:306:41
: error: 'SF_FORMAT_RF64' was not declared in this scope
mingw32-make[2]: *** [src/SFML/Audio/CMakeFiles/sfml-audio.dir/SoundFile.cpp.obj
] Error 1
mingw32-make[1]: *** [src/SFML/Audio/CMakeFiles/sfml-audio.dir/all] Error 2
mingw32-make: *** [all] Error 2