SFML community forums
Help => General => Topic started by: Leodido on March 17, 2010, 04:02:13 pm
-
I have set everything like in the tutorial for visual C++ 2008 express edition, and i can compile fine and if I execute the program it works fine but if I try to debug as soon as the the console pops up I get an unhandled exception and apparently SFML could not load my game resources so I decide to abort the game.
Otherwise the data are loaded correctly since I could play my tetris ^^
Also on another computer I can debug perfectly fine but not on this one (Windows 7 64 bit and the other is XP btw)
I double checked and I use the following files for linker->input->additionnal dependencies
sfml-system-d.lib
sfml-window-d.lib
sfml-graphics-d.lib
sfml-audio-d.lib
-
You must set the working directory in your project settings (in "debugging"). Set it to $(TargetDir) so that it is always the same path as the executable.
-
thanks it worked :)
-
I have a problem with debugger too, but I didn't pay much attention to it yet, I rarely use debugger :lol:
It compile and run perfectly on debug target, but if I start the debugger it explodes immediately with segmentation fault:
Program received signal SIGSEGV, Segmentation fault.
In guard32!?Exported@@YAXXZ () (C:\WINDOWS\system32\guard32.dll)
It happens if I use SFML classes other than the simplest ones (like sf::Clock, sf::IntRect, sf::Event, etc.. if I only use classes like those, debugger doesn't explode)
code::blocks (mingw)
-
Don't you have a source code to show ?
a minimal one giving the same error ?
I had these kind of error recently and it was all my fault :oops:
-
Nah, this isn't a question of code, it should be something deeper.
As simple as this:
#include <SFML\Window.hpp>
int main(){
sf::Window wn;
return EXIT_SUCCESS;
}
It compiles and run fine:
mingw32-g++.exe -Wall -fexceptions -DSFML_DYNAMIC -g -Wall -I..\..\include -c "<project path here>\main.cpp" -o ..\..\Temp\Debug\main.o
mingw32-g++.exe -L..\..\lib -o ..\..\lib\testing-d.exe ..\..\Temp\Debug\main.o -lsfml-window-d -lsfml-system-d
Output size is 245.90 KB
Process terminated with status 0 (0 minutes, 2 seconds)
0 errors, 0 warnings
I have reinstalled c::b and minGW but it does the same.
-
Disable Comodo Firewall Defense+. You need to reset your computer.