[MPlayer-users] libmpdemux/asf_mmst_streaming.c compilation problem

Steven M. Schultz sms at 2BSD.COM
Mon Nov 3 17:56:47 CET 2003


On Mon, 3 Nov 2003, Attila Kinali wrote:

> "Steven M. Schultz" <sms at 2BSD.COM> wrote:
> > > cc -c -O4 -march=i686 -mcpu=i686 -pipe -ffast-math -fomit-frame-pointer -D_THREAD_SAFE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -I../loader      -o asf_mmst_streaming.o asf_mmst_streaming.c
> > > asf_mmst_streaming.c:27: langinfo.h: No such file or directory
> > > asf_mmst_streaming.c: In function `string_utf16_open':
> > > asf_mmst_streaming.c:117: `CODESET' undeclared (first use in this function)
> > > asf_mmst_streaming.c:117: (Each undeclared identifier is reported only once

> > 	Adding --disable-iconv gets everything compiled but there are
> > 	undefined symbols at link time.     
> > 
> > font_load_ft.o(.text+0x1a4b): undefined reference to `libiconv_open'
> > font_load_ft.o(.text+0x1a6c): undefined reference to `libiconv_close'
> > font_load_ft.o(.text+0x1a76): undefined reference to `libiconv_open'
> > font_load_ft.o(.text+0x1b08): undefined reference to `libiconv'
> > font_load_ft.o(.text+0x1b7a): undefined reference to `libiconv_close'
> 
> Can't reproduce any of these.
> So, Rich is right, it's PEBCAK

	Have you tried building on a different system?   The problem is
	completely reproducible for me - even after make clean and
	./configure.   

	I still do not see how the references to iconv() can be 
	satisfied if --disable-iconv is used.

	The whole problem goes away if the attached (small/trivial) patch
	is used - it works the same for systems which have both of the
	routines nl_langinfo and setlocale and for systems which only
	have setlocale.

	Cheers,
	Steven Schultz
-------------- next part --------------
--- asf_mmst_streaming.c.dist	Sun Nov  2 20:20:23 2003
+++ asf_mmst_streaming.c	Sun Nov  2 22:08:45 2003
@@ -24,7 +24,6 @@
 
 #ifdef USE_ICONV
 #include <locale.h>
-#include <langinfo.h>
 #include <iconv.h>
 #endif
 
@@ -114,7 +113,7 @@
 
 static void string_utf16_open() {
     setlocale(LC_CTYPE, "");
-    url_conv = iconv_open("UTF-16LE",nl_langinfo(CODESET));
+    url_conv = iconv_open("UTF-16LE", setlocale(LC_CTYPE, NULL));
 }
 
 static void string_utf16_close() {


More information about the MPlayer-users mailing list