Mail Archives: djgpp/1998/10/22/11:11:31
Guruman wrote in message <70m5nj$n7i$1 AT news DOT interlog DOT com>...
> I cannot successfully link this library into my code.
Here's another interesting thing.
I decided to try and compile one of the demo programs separately from
the main installation.
In order to succesfully compile the included demo program, I had to
actually add the library filename to the command line, as so:
gcc -o playmp3.exe playmp3.o libamp.a -lalleg -lamp
Unless 'libamp.a' was copied to the folder containing the source, it
wouldn't compile. Using RHIDE, I couldn't get it to compile at all and ended
up with tons of weird-looking errors:
Error: d:/djgpp/lib/libamp.a(audioalg.o)(.text+0xf5):audioalg.c: undefined
reference to `play_audio_stream'
which looks to me like somehow Allegro wasn't getting linked properly.
If 'libamp.a' isn't specified in the above command line, the same errors
occur.
Using a similar approach on my program, I still get the unresolved
function errors.
Why does this library only work when linked like this? Is there a
certain 'type' of library (or method of compilation) that requires this
method of linking? I am somewhat inexperienced with the gcc environment - I
learned C and C++ from books, in a compiler-independant manner. Any
assistance, or references to documentation on .a libraries would be greatly
appreciated.
- Raw text -