Hi,
I bought a game programming book with a cd that uses the allegro game library. It compiles just fine but when I run it I get a runtime error and it terminates. I am running windows vista and using Dev-C++ IDE. This is the source code:
#include <allegro.h>
int main(void) {
allegro_init();
set_gfx_mode(GFX_SAFE, 640, 480, 0, 0);
install_keyboard();
textout_ex(screen, font, "Hello World!", 1, 1, 10, -1);
textout_ex(screen, font, "Press ESCape to quit.", 1, 12, 11, -1);
while(!key[KEY_ESC]);
allegro_exit();
return 0;
}
END_OF_MAIN()
It compiles just fine but when I try to run the .exe file I get this error message:
Microsoft Visual C++ Runtime Libary
Runtime Error!
Program: C:\Users\...
R6034
An application has made an attempt to load the C runtime library incorrectly.
Please contact the application's support team for more information.
I then get a error message saying:
allegro.exe - Application Error
The application falied to initialize properly (0xc0000142). Click OK to terminate the application.
The exact same program worked on my old XP computer. Any ideas?
You are using the wrong C runtime or Allegro DLL.