SFML community forums
Help => General => Topic started by: Atifhossain on March 10, 2013, 12:20:58 pm
-
I downloaded SFML with this tutorial : http://www.sfml-dev.org/tutorials/2.0/start-cb.php
I recently downloaded SFML 2.0 RC from here : http://www.sfml-dev.org/download.php. I dloaded this one
C++ | Version 2.0 RC >> Windows 32 bits - GCC DW2 (11.5 MB).
I did all that was written in the tutorial. I used the dynamic version of SFML and moved all the required dlls. Created an empty project and entered this code in main.cpp
By the way, I use Code::Blocks IDE. I did not install C::B with the MinGW compiler.
#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;
}
Here's the build message :
-------------- Build: Debug in SFMLtest (compiler: GNU GCC Compiler)---------------
mingw32-g++.exe -Wall -g -ID:\Atif\SFML\SFML-2.0-rc\include -IC:\MinGW\include -c D:\Atif\SFMLtest\main.cpp -o obj\Debug\main.o
mingw32-g++.exe -LD:\Atif\SFML\SFML-2.0-rc\lib -o bin\Debug\SFMLtest.exe obj\Debug\main.o -lsfml-graphics -lsfml-window -lsfml-system -mwindows
Output size is 45.25 KB
Process terminated with status 0 (0 minutes, 1 seconds)
0 errors, 0 warnings (0 minutes, 1 seconds)
When I Run it , it says :
Checking for existence: D:\Atif\SFMLtest\bin\Debug\SFMLtest.exe
Executing: "D:\Atif\SFMLtest\bin\Debug\SFMLtest.exe" (in D:\Atif\SFMLtest\.)
Process terminated with status -1073741819 (0 minutes, 0 seconds)
What should I do ?
-
I am having a very similar problem to this, as well.
I followed the same Code::Blocks tutorial and I'm also using the sample code provided in that tutorial. I've made sure all the compiler and linker settings are correct many many times, yet I still can't get it to run correctly.
The only difference is that I've installed the Windows 32 bits - GCC SJLJ (Code::Blocks) version of C++ SFML 2.0 RC. When I run, the console displays no output and this (http://i.imgur.com/M5UadiF.png (http://i.imgur.com/M5UadiF.png)) occurs. If I close the program before that error window shows, the program returns with status -1073741819. If I wait and press Close Program, it returns with 255.
I can make a separate thread with more information if necessary, but I'm sure both Atifhossain and I would appreciate some help on this one.
-
If you're both using the latest Code::Blocks + MinGW version, then you'll have to recompile SFML (or use my Nightly Builds), because GCC 4.7.x isn't compatible with the RC binaries.
-
I conficured with this tutorial http://www.sfml-dev.org/tutorials/2.0/compile-with-cmake.php . And also from this one : http://sfmlcoder.wordpress.com/2011/05/11/building-sfml-2-0/ . It worked