Allegro and Dev C++?
Is it possible to use Dev C++ and Allegro for graphics under DOS? I''d select console application and then load liballeg.a as my object file (not sure if I even have to do that). Everytime I try and compile a program that uses Allegro, it gives me errors though. For example, I used this sample program:
#include <allegro.h>
int main()
{
allegro_init();
install_keyboard();
set_gfx_mode(GFX_VGA,320,200,0,0);
textout_centre(screen,font,"Ready. Beep.",160,100,255);
readkey();
return 0;
}
In return, I got these errors when trying to compile it:
7 untitled1.cpp
`GFX_VGA'' undeclared (first use this function)
7 untitled1.cpp
(Each undeclared identifier is reported only once
7 untitled1.cpp
for each function it appears in.)
I''ve tried to look up on how to use Allegro under Dev C++ but all I could find is how to use it under DJGPP. The above program was an example from one of those tutorials but I can''t see why it would be different in Dev C++?
You'll have to add the library to Dev-C++. Here's some links...
How to Link Allegro Library
Automatic installer (?) for Allegro to Dev-C++
Hope these help!!
edit: i see that you did add the library... sorry. but the links are to Dev-C++ themselves so hopefully they have your answer.
[edited by - Alpha_ProgDes on December 26, 2002 6:04:27 AM]
How to Link Allegro Library
Automatic installer (?) for Allegro to Dev-C++
Hope these help!!
edit: i see that you did add the library... sorry. but the links are to Dev-C++ themselves so hopefully they have your answer.
[edited by - Alpha_ProgDes on December 26, 2002 6:04:27 AM]
looks like you might have forgotten to include a header file. Double-check your code.
-This is where the world drops off
-ryan@lecherousjester.com
-This is where the world drops off
-ryan@lecherousjester.com
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement