From: "Chris A. Triebel" Newsgroups: comp.os.msdos.djgpp Subject: Re: Compiling Allegro Examples Date: Tue, 24 Sep 1996 08:09:13 -0400 Organization: University of New Hampshire - Durham, NH Lines: 34 Message-ID: References: <52491v$h52 AT dfw-ixnews3 DOT ix DOT netcom DOT com> NNTP-Posting-Host: sun4.iol.unh.edu Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII In-Reply-To: <52491v$h52@dfw-ixnews3.ix.netcom.com> To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp On 22 Sep 1996, Takahiro Horie wrote: > Date: 22 SEP 1996 20:54:23 GMT > From: Takahiro Horie > Newgroups: comp.os.msdos.djgpp > Subject: Compiling Allegro Examples > > Dear Allegro Gurus, > > Thanks for looking at my query. I just got Allegro 2.1 and am very > excited to start using it. I ran the demo and the examples and I was > completely stunned! > Now that I am going to try to make some things myself, I tried to > compile the EX1.C source: > > gcc ex1.c > > and the result was 13 errors: > > ex1.c(.text+0x19): undefined reference to 'allegro_init' > ex1.c(.text+0x1e): undefined reference to 'install_keyboard' > etc... > When you see these errors check to make sure you are not missing a library on your command line. Especially when you are using an add-on package. Your command line should be ... gcc ex1.c -lalleg The -l parameter is used to tell the linker to use additional libraries when looking for references to objects/functions. cat