Mail Archives: djgpp/1996/08/07/14:50:15
Xref: | news2.mv.net comp.os.msdos.djgpp:6757
|
From: | c533483 AT showme DOT missouri DOT edu
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | allegro compiling problem et. al.
|
Date: | Sat, 03 Aug 96 08:51:00 GMT
|
Organization: | University of Missouri - Columbia
|
Lines: | 56
|
Message-ID: | <4tv3qa$jdg@news.missouri.edu>
|
NNTP-Posting-Host: | mizzou-ts7-10.missouri.edu
|
Keyword: | allegro
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Question 1
I am having trouble compiling the following program:
#include <stdlib.h>
#include <stdio.h>
#include "allegro.h"
void main()
{
allegro_init();
install_keyboard();
set_gfx_mode(GFX_VGA, 320, 200, 0, 0);
readkey();
exit(0);
}
It gives the following error messages:
C:\DJGPP\allegro>gcc ex15.c
ex15.c(.text+0x9): undefined reference to `allegro_init'
ex15.c(.text+0xe): undefined reference to `install_keyboard'
ex15.c(.text+0x23): undefined reference to `set_gfx_mode'
ex15.c(.text+0x2b): undefined reference to `readkey'
as you can see, all i want it to do is take me to a graphic mode and then with
a keypress take me back out of it. i just cut down the example 15 in the
allegro library and tried it. I think perhaps i'm overlooking something
minor, but can't really see the difference. I have allegro in its own
directory under djgpp. Maybe i should move the .h file to include and the .a
file to libc but i'm not familiar enuf with djgpp or gcc to start playing
around with directories and filling them up with stuff i don't know about.
Question 2:
I want to know more about a function -- open(). The book i'm using says to
check the header file (i assume the .h file). It says that this particular
function is system dependent, so i go to the sys directory and start checking
each .h file. None of them contain prototypes for the functions. What's
wrong (or right :) with this and how do i go about learning more about
functions? i checked many .h files and the info program, nothing was
available that i could find. could someone lead me in the right direction?
Question 3:
I would like to learn how to create my own .h files. Is there a tutorial that
covers this topic somewhere on the internet. I have found info, but always
run into trouble when i try it on my own. If i try to create a file that
does, for instance, a stack i always seem to run into pointer trouble. I
would appreciate any help that i can get :) I know how to actually create the
file with gcc, that's not my problem...i guess it's just getting it the code
to agree on what i've written (maybe it's a conspiracy :)
Thanks for listening,
Tom Hildrich
- Raw text -