That's odd. I would use something like this to compile my allegro program from the command line using v5.5:
bcc32 -tW -5 -lc:\bcc55\bin\alleg.lib -etest.exe test.c
Making sure I had bcc32.cfg and ilink32.cfg in the directory, and where bcc55 is the path to my Borland compiler.
Actually, this should work for 4.5 as well (I have heard that it does).
Please try to compile this program (compile as Windows prog, not console):
PHP Code:
#include <allegro.h>
int main()
{
// Initialize Allegro.
allegro_init();
// Set the resolution to 640 by 480 with SAFE autodetection.
set_gfx_mode(GFX_SAFE, 640, 480, 0, 0);
// Installing the keyboard handler.
install_keyboard();
// Printing text to the screen.
textout(screen, font, "Hello World!", 1, 1, 10);
textout(screen, font, "Press ESCape to quit.", 1, 12, 11);
// Looping until the ESCape key is pressed.
while(! key[KEY_ESC])
poll_keyboard(); // This shouldn't be necessary in Windows.
// Exit program.
allegro_exit();
return 0;
}
// Some Allegro magic to deal with WinMain().
END_OF_MAIN();
Hope you have better luck with that example. I'm going to try getting it to work with 4.5 and let you know if and how I was successful. Sorry, I'm not able to be online very often lately, but I'll try to respond as quickly as possible.
-Justin