I am attempting to compile a very simple program with SFML. Any attempt to draw a simple sf::RectangleShape results in a crash. I have compiled SFML 2 using mingw-gcc 4.8.1 and can compile it perfectly fine without a draw call. I have an outdated system and am on windows 7 and my GFX Card doesnt only had drivers for XP. I have those installed. I'm assuming this is the core of the problem but wanted another opinion.
#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>
#define Window_Height 800
#define Window_Width 600
int main(){
sf::RenderWindow window(sf::VideoMode(Window_Height, Window_Width), "First SFML Game");
sf::RectangleShape arrofshape[10];
sf::RectangleShape shape;
bool draw = 1;
for (int i; i < 10; i++){
arrofshape[i].setFillColor(sf::Color::Red);
arrofshape[i].setScale(sf::Vector2f(10,10));
}
while (window.isOpen()){
sf::Event event;
while(window.pollEvent(event)){
if (event.type == event.Closed){
window.close();
}
}
window.clear(sf::Color::Black);
window.display();
}
return 0;
}