[mad-dev] Compiling minimad.c under Windows

Rob Leslie rob@mars.org
Sun, 6 Jun 2004 12:45:29 -0700


On Jun 6, 2004, at 2:34 AM, Some One wrote:
> Hi, I'm trying to compile minimad.c using Cygwin and GCC.
>
> I've copied the "libmad-0.51.1b" folder into the Cygwin root as "mad" 
> and followed all the steps in the "INSTALL" file (configure, make, 
> make install). It does all that fine (makes the Makefile and config 
> file, creates the objects in the "./deps" folder, installs the mad 
> library in "usr/local/lib" and puts "mad.h" in "usr/local/include").
>
> However, when a try "make minimad" in the "mad" folder, it returns:
> "gcc -Wall -march=i486 -g -O -fforce-mem -fforce-addr -fthread-jumps 
> -fcse-follow -jumps -fcse-skip-blocks -fexpensive-optimizations 
> -fregmove -fschedule-insns2 -fstrength-reduce
> minimad.c   -o minimad
> /cygdrive/c/DOCUME~1/USERNAME/LOCALS~1/Temp/ccyf7LL5.o(.text+0xc3): In 
> function `input':
> /mad/minimad.c:92: undefined reference to `_mad_stream_buffer'
> /cygdrive/c/DOCUME~1/USERNAME/LOCALS~1/Temp/ccyf7LL5.o(.text+0x246): 
> In function `error':
> /mad/minimad.c:177: undefined reference to `_mad_stream_errorstr'
> /cygdrive/c/DOCUME~1/USERNAME/LOCALS~1/Temp/ccyf7LL5.o(.text+0x2a7): 
> In function `decode':
> /mad/minimad.c:209: undefined reference to `_mad_decoder_init'
> /cygdrive/c/DOCUME~1/USERNAME/LOCALS~1/Temp/ccyf7LL5.o(.text+0x2b2):
> /mad/minimad.c:215: undefined reference to `_mad_decoder_run'
> /cygdrive/c/DOCUME~1/USERNAME/LOCALS~1/Temp/ccyf7LL5.o(.text+0x2bc):
> /mad/minimad.c:219: undefined reference to `_mad_decoder_finish'
> collect2: ld returned 1 exit status
> make: *** [minimad] Error 1"
>
> I don't know what I'm doing wrong or even what it means by "undefined 
> reference".

Try instead: make minimad.exe

-- 
Rob Leslie
rob@mars.org