Problems with Allegro

Started by
3 comments, last by LennyLen 13 years, 3 months ago
Hello!

I'm new with allegro, and i have some problems with my programs.

I'm using Devc++and when i execute the program from Dev (F9), it runs Ok. But when i try to run the program from the .exe, it doesn't do anything. There is no error message.
I have all my proyects in the Examples folder, of Dev.
I installed this version of Allegro from the download options (version 4.4.0).

Thanks for the help! ;)

PD: sorry my english, i'm from Argentina.
Advertisement

I'm using Devc++and when i execute the program from Dev (F9), it runs Ok.

Just by dint of using Dev-C++, you are automatically in uncharted territory.

But when i try to run the program from the .exe, it doesn't do anything. There is no error message.
The most likely issue is that your program cannot find one of its required DLLs. Have you placed the Allegro DLL(s) in the same directory as the program?

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]


The most likely issue is that your program cannot find one of its required DLLs. Have you placed the Allegro DLL(s) in the same directory as the program?

A missing dll will cause an error message. A more likely explanation is that the program cannot find one of the assets (bitmaps, sound files, etc) it requires, so function like load_bitmap() are returning NULL pointers, causing the program to crash instantly. This is common when switching from running a program through an IDE to running it natively.


Without any code to go by, it's pretty hard to tell though.
Try looking in the allegro error log. Try running the program from the console to check for errors. Check ALL your allegro init return values and image loading values and std::cerr if there's a problem, and run from console. Time to learn the art of debugging, my friend.

But i'm with LennyLen on this, sounds like a case of missing assets.
Try looking in the allegro error log.

In case ithereaver doesn't know, the log is only produced by linking against the debug version of the library.


This topic is closed to new replies.

Advertisement