From: "Guruman" Newsgroups: comp.os.msdos.djgpp Subject: Re: Setup of LibAmp library (Allegro / DJGPP) Date: Thu, 22 Oct 1998 12:07:44 -0400 Organization: Interlog Internet Services Lines: 39 Message-ID: <70nkv9$n85$1@news.interlog.com> References: <70m5nj$n7i$1 AT news DOT interlog DOT com> NNTP-Posting-Host: 209-20-0-176.dialin.interlog.com NNTP-Posting-Time: 22 Oct 1998 16:02:49 GMT X-Newsreader: Microsoft Outlook Express 4.72.3110.5 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com 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.