www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/09/23/00:36:06

From: "John M. Aldrich" <fighteer AT cs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Compiling Allegro Examples
Date: Sun, 22 Sep 1996 23:28:27 -0700
Organization: Three pounds of chaos and a pinch of salt
Lines: 40
Message-ID: <32462E0B.593C@cs.com>
References: <52491v$h52 AT dfw-ixnews3 DOT ix DOT netcom DOT com>
Reply-To: fighteer AT cs DOT com
NNTP-Posting-Host: ppp228.cs.com
Mime-Version: 1.0
To: Takahiro Horie <takahiro AT ix DOT netcom DOT com>
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Takahiro Horie wrote:
> 
> 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...
> 
> I can tell it's a gcc invoking problem. Could you help me?

Gotta link the liballeg.a library with "-lalleg" at the end of your gcc
command line, like so:

gcc ex1.c -lalleg

The sample programs should come with a makefile/makefiles to
automatically compile them - when you type 'make', watch the commands
that it spits out to see how this works.

-- 
John M. Aldrich <fighteer AT cs DOT com>                      

* Anything that happens, happens.
* Anything that, in happening, causes something else to happen,
  causes something else to happen.
* Anything that, in happening, causes itself to happen again, happens
  again.
* It doesn't necessarily do it in chronological order, though.
 
                                       --- Douglas Adams

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019