delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/10/30/22:46:47

From: "John M. Aldrich" <fighteer AT cs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: 99% sure bug.But i dunno if it's allegro or djgpp's fault..
Date: Fri, 31 Oct 1997 10:04:22 +0000
Organization: Two pounds of chaos and a pinch of salt
Lines: 34
Message-ID: <3459AD26.1DFB@cs.com>
References: <199710301806 DOT TAA02169 AT free DOT polbox DOT pl>
Reply-To: fighteer AT cs DOT com
NNTP-Posting-Host: ppp221.cs.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

=?ISO-8859-2?Q?Robert_Darmochwa=B3?= wrote:
> 
> everything seems t be ok, but when i ling gcc -g main.c liballeg.a foo.o,
> after compiling foo.c off course (gcc -c foo.c)
> gcc says: unresolved external play_memory_fli...
> 
> and here's most exciting part:
> 
> when i add a line to my main() function, stored in file main.c
> which calls play_memory_fli too, it compiles then...

Since others have already answered your main question, I'll add a
different comment.  Why exactly are you linking liballeg.a in this
manner?  All you have to do is put it in your djgpp/lib directory and
you can use '-lalleg' to link it.  gcc doesn't treat it any differently,
but it's far more portable and easier to manage; otherwise you will need
a separate copy of liballeg.a for each program you write!

If you don't want to copy the Allegro lib into the main DJGPP lib
directory, you can add the Allegro directory to your LIBRARY_PATH
variable in 'djgpp.env'.

BTW, have you examined the Frequently Asked Questions list
(v2/faq210b.zip from SimTel or online at
http://www.delorie.com/djgpp/v2faq/)?  Most common DJGPP-related
questions are answered there, including this one in chapter 8.9.

-- 
---------------------------------------------------------------------
|      John M. Aldrich       | "Be wary of strong drink.  It can    |
|       aka Fighteer I       | make you shoot at tax collectors--   |
|   mailto:fighteer AT cs DOT com   | and miss."                           |
| http://www.cs.com/fighteer |                 - Lazarus Long       |
---------------------------------------------------------------------

- Raw text -


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