Reputation:
I've just started developing with SFML 2.1 on Windows 7 using Code::Blocks as my IDE. I am using the libraries compiled for MinGW. I followed the tutorial for how to setup SFML in Code::Blocks, but I've run into an error that I've never seen before when I run the program:
The application was unable to start correctly (0xc00000be). Click OK to close the application.
So far, I've tried both statically and dynamically linking SFML to no avail. I've tried running both debug mode and release mode, which also produced the same error each time. The error occurs every time I execute the program, but no errors when I compile.
Yes, I do have libraries linked in the proper order, and yes I am using the xxxx-s
when I link the libraries statically and xxxx-d
for debugging, as well as xxxx-s-d
for statically linked debug. At the time of this post, I just got the latest SFML 2.1 roughly 10 hours ago, so unless SFML has updated since, I am using the latest build. I also tried to rebuild the project, which also did not fix.
However, I did try re-arranging the libraries in a different order (sfml-system
first, then sfml-window
, and then sfml-graphics
; yes I know this is in reverse order, but it was just to test) and it still produced the same error.
Source code:
#include <SFML/Graphics.hpp>
int main() {
sf::RenderWindow window(sf::VideoMode(800, 600), "SFML Works!");
sf::CircleShape circle(50.f);
circle.setFillColor(sf::Color::Red);
while (window.isOpen()) {
sf::Event event;
while (window.pollEvent(event)) {
if (event.type == sf::Event::Closed)
window.close();
}
window.clear();
window.draw(circle);
window.display();
}
return 0;
}
Edit:
Semi-fix: If I use SFML compiled for TDM, then the program runs with no errors. However, if I use the MinGW libraries, I get the error: The procedure entry point__gxx_personality_v0 could not be located in the dynamic link library libstdc++-6.dll
.
Upvotes: 0
Views: 1241
Reputation: 36487
I don't think that's the reason for the crash, but your drawing code is inside the event loop, which shouldn't happen. You'll have that closing bracket (}
) up before window.clear()
.
Other than that, the problems seems to be somewhere outside the source you posted.
Edit:
The error message
The procedure entry point__gxx_personality_v0 could not be located in the dynamic link library libstdc++-6.dll.
usually indicates that the executable is somehow finding/loading the wrong version of the library libstdc++-6.dll. A reason for this could be a different version in a system directory or your application's directory.
To solve this, you'll have to track down the wrong copy being loaded. You can do this e.g. with Dependency Walker. Just run the program and drag&drop your executable into it. It will then show you an explorer like tree with the specific libraries it tried to load. Locate the library file and see whether it's the correct one or not.
Upvotes: 1