I had a couple ideas to create images, so I wanted to test out and get used to saving an image with SFML, but for some reason it always throws an error.
#include <stdio.h>
#include "SFML/Graphics.hpp"
int main() {
// Window
// Main Window
RenderWindow window(VideoMode(900, 600), "Conecept", Style::Default);
Image image;
image.create(30, 30, Color::White);
if (!image.saveToFile("result.bmp")) printf("Error >:(\n");
return 0;
}
Idk if it's what I have or if it's something to do with Visual Studio's libraries. These are my libs:
sfml-graphics.lib
sfml-window.lib
sfml-system.lib
sfml-main.lib
opengl32.lib
freetype.lib
winmm.lib
gdi32.lib
Started throwing:
Exception thrown at 0x60A76B9E (sfml-graphics-2.dll) in Concept4.exe: 0xC0000005: Access violation reading location 0x0258F717.