Mail Archives: djgpp/1997/10/30/22:46:47
=?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 -