bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: can't build gettext-0.15-pre5 in Mingw (Windows XP)


From: Bruno Haible
Subject: Re: can't build gettext-0.15-pre5 in Mingw (Windows XP)
Date: Fri, 14 Jul 2006 14:11:04 +0200
User-agent: KMail/1.9.1

haibin zhang wrote:
> mkdir .libs
> chmod 777 .libs
> gcc -O2 -Wl,--disable-auto-import -o .libs/gettext.exe gettext-gettext.o  
> ../lib/libgrt.a ../intl/.libs/libintl.dll.a -lmsvc
> p60 /mingw/lib/libiconv.dll.a -L/mingw/lib
> gettext-gettext.o:gettext.c:(.text+0x63): undefined reference to `__printf__'
> gettext-gettext.o:gettext.c:(.text+0x6f): undefined reference to `__printf__'
> gettext-gettext.o:gettext.c:(.text+0x83): undefined reference to `__printf__'
> gettext-gettext.o:gettext.c:(.text+0x8f): undefined reference to `__printf__'
> gettext-gettext.o:gettext.c:(.text+0xa3): undefined reference to `__printf__'
> gettext-gettext.o:gettext.c:(.text+0xaf): more undefined references to 
> `__printf__' follow
> collect2: ld returned 1 exit status
> make[3]: *** [gettext.exe] Error 1

Thanks for reporting this, in time before the 0.15 release. Below is a fix.

Bruno


*** gettext-runtime/intl/printf.c       20 May 2005 21:05:59 -0000      1.7
--- gettext-runtime/intl/printf.c       14 Jul 2006 12:12:59 -0000
***************
*** 61,66 ****
--- 61,74 ----
  
  #define STATIC static
  
+ /* This needs to be consistent with libgnuintl.h.in.  */
+ #if defined __NetBSD__ || defined __CYGWIN__ || defined __MINGW32__
+ /* Don't break __attribute__((format(printf,M,N))).
+    This redefinition is only possible because the libc in NetBSD, Cygwin,
+    mingw does not have a function __printf__.  */
+ # define libintl_printf __printf__
+ #endif
+ 
  /* Define auxiliary functions declared in "printf-args.h".  */
  #include "printf-args.c"
  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]