This code was stripped from my game to make a basic Allegro 5 setup...
However for some obscure reason I can't get it to run...
segmentation fault, illegal call etc...
Anyone ?
EDIT seems like the mt version of the library is causing trouble... with the md version everything works fine......
Try debugging it, set breakpoint to the first line of your main and go step by step, jumping into every function and see what exactly is causing your segfaults and other errors.
You should probably instantly return failure when anything fails rather than embracing whole thing into a block.
If you're on Linux, you could use valgrind to determine the exact cause of the problem.
Just run a debugging version through a debugger and find out where the segfault is with a backtrace. Or did you try that already? You didn't say.
If you're on Linux, you could use valgrind to determine the exact cause of the problem.
Thanks for pointing out this lovely program.