[MPlayer-cygwin] [PATCH] mingw support for TOOLS/netstream

Erik Lunchpail erik_27can at yahoo.com
Thu May 5 00:46:48 CEST 2005


> 
> How did you do that?  I cannot get it to compile
> currently.
> 
> > +	$(CC) $(CFLAGS) netstream.o -o netstream
> $(MPROOT)/libmpdemux/libmpdemux.a
> $(MPROOT)/libmpdvdkit2/libmpdvdkit.a
> $(MPROOT)/libmpcodecs/native/minilzo.o
> $(MPROOT)/libvo/aclib.o
> $(MPROOT)/libmpcodecs/img_format.o
> $(MPROOT)/liba52/liba52.a $(MPROOT)/m_option.o
> $(MPROOT)/m_struct.o $(MPROOT)/subreader.o
> $(MPROOT)/mp_msg.o $(MPROOT)/osdep/glob-win.o
> $(MPROOT)/osdep/shmem.o $(MPROOT)/osdep/timer-*.o
> $(MPROOT)/osdep/strl.o $(VORBIS_LIB)
> $(CDPARANOIA_LIB) $(Z_LIB) $(GIF_LIB)
> $(SMBSUPPORT_LIB) $(LIVE_LIBS) $(ARCH_LIB)
> $(COMMON_LIBS) $(WIN32_LIBS) -lwsock32 -lwinmm -lm
>  
> This is broken and fails on Linux since -lwsock32,
> -lwinmm and
> $(MPROOT)/osdep/glob-win.o cannot be resolved.  You
> have a typo in
> there, $(WIN32_LIBS) should be $(WIN32_LIB) and
> contain -lwsock32 and
> -lwinmm.  This will bring us closer to a portable
> version.
> 
> Anyway, I'm going to be bold and break that line,
> reviewing changes in
> such a beast is pure horror.
>  
> > -int verbose=0;
> > +int verbose=1;
>  

Yeah netstream is a weird one to compile, it changes
almost everytime i compile it depending on what is or
is not enabled/disabled. For me at least, it couldn't
find libao2/afmt.o so that was the first linking
error, and i got unresolved references to glob and
globfree so i linked it against glob-win.o. Yeah the
WIN32_LIBS is a typo sorry. I suppose a more portable
fix would be to #ifdef that too..

#ifdef __MINGW32__
   $(CC) $(CFLAGS) netstream.o -o netstream ..win32
#else
   $(CC) $(CFLAGS) netstream.o -o netstream ..
#endif

I just changed the verbose line to debug, it can be
left out. I also don't have cygwin, so i can't test it
as #ifdef WIN32 but it should work fine.

I'll try to send a more portable diff

Regards,
Erik

______________________________________________________________________ 
Post your free ad now! http://personals.yahoo.ca




More information about the MPlayer-cygwin mailing list