Sign in to follow this  

Other Allegro Problems

This topic is 3714 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey everyone. I'm using Windows XP Pro with MS Visual C++ 8. I can compile allegro programs just fine, but when I try to execute them I get: "The application failed to initialize properly (0xc0150002)" Know how to fix this?

Share this post


Link to post
Share on other sites
Could you post your source code please and tell me how you setup your project? Maybe then I could try and solve the problem. I've worked in Allegro before, so I could slash it down to a couple of problems you could be doing, or not doing for that matter.

edit: tried given you the correct syntax of using copying and pasting source code in a forum if you need to see how it's done just quote this forum and look at the text below

you'll have something like this


my source code



Share this post


Link to post
Share on other sites
I have the platform SDK installed. I have the DirectX 9 SDK.

#include <allegro.h>

DATAFILE*data;

int main()
{
allegro_init();
set_config_file("GAMECONFIG.cfg");
install_keyboard();

if (install_sound(DIGI_AUTODETECT, MIDI_AUTODETECT, NULL)) {
allegro_message("Sound Error: %s", allegro_error);
return 1;
}

set_volume(130,130);

return 0;
}
END_OF_MAIN();

Share this post


Link to post
Share on other sites
You haven't created any video mode, so I think I'm not 100% sure so please don't quote me, but having a similar problem like this before, and knowing what I had to do to fix this is this.

You have some allegro code and if you don't support a video mode, or initialize the video mode at all then you basically have no window, so the code that you do have, and the allegro that you have initialized goes to memeory but from their it doesn't know where to go, or what to do, for their is no display.

So try adding


int ret = set_gfx_mode(GFX_AUTODETECT_WINDOWED, 640, 480, 0, 0);

if(ret != 0)
{
allegro_message(allegro_error);
}



Hope this helps!

Share this post


Link to post
Share on other sites
Are you trying to run your program within the VS IDE?
If so you probably have to copy the necessary allegro dll's to your debug or release directory if you already haven't.
I know this caused me problems when I first started learning Allegro.

Share this post


Link to post
Share on other sites
I'm 95% sure Reinstalling my WinXP Service Pack will fix this problem. Sorry to re bring up this post, but this may help a lot of people.

Here is something I was reading: http://support.microsoft.com/kb/822520

Share this post


Link to post
Share on other sites

This topic is 3714 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this