Advertisement

Allegro and Dev C++?

Started by December 26, 2002 04:14 AM
2 comments, last by aphid 21 years, 10 months ago
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]

Beginner in Game Development?  Read here. And read here.

 

Advertisement
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
You could also try replacing GFX_VGA with GFX_AUTODETECT

No idea if it''ll work, but it''s the simplest change I could think of that might.

This topic is closed to new replies.

Advertisement