Matthias Miller wrote:
I've successfully compiled apr with msys/mingw and am trying to compile apr-iconv from the trunk. I'm getting the following error:

libtool --silent --mode=compile gcc -g -O0 -DHAVE_CONFIG_H -D_LARGEFILE64_SOURCE -I/c/src/apr-iconv/lib -I/c/src/apr-iconv/include -I/usr/local/include -o iso-8859-1.lo -c iso-8859-1.c && touch iso-8859-1.lo
iso-8859-1.c:134: error: initializer element is not constant
iso-8859-1.c:134: error: (near initialization for `iconv_module.imd_event')
I have attached a patch to get apr-iconv to compile under MinGW/msys. Can somebody confirm that the TARGET_LIB in Makefile.in should be "libapriconv-1.la" instead of "libapriconv.la"?

Thanks.

-Matthias Miller
Index: include/apr_iconv.h
===================================================================
--- include/apr_iconv.h (revision 448907)
+++ include/apr_iconv.h (working copy)
@@ -64,7 +64,7 @@
  * and calling conventions at compile time.
  */
 
-#if defined(DOXYGEN) || !defined(WIN32)
+#if defined(DOXYGEN) || !defined(WIN32) || defined(__MINGW32__)
 /**
  * The public apr-iconv functions are declared with API_DECLARE(), so they 
  * use the most portable calling convention.  Public apr-iconv functions 
Index: lib/Makefile.in
===================================================================
--- lib/Makefile.in     (revision 448907)
+++ lib/Makefile.in     (working copy)
@@ -9,7 +9,7 @@
 
 INCLUDES = @API_INCLUDES@ @APR_INCLUDES@
 
-TARGET_LIB = libapriconv.la
+TARGET_LIB = libapriconv-1.la
 SUBDIRS = .
 
 EXPORT_FILES = $(abs_srcdir)/include/*.h $(abs_srcdir)/lib/*.h
@@ -36,6 +36,8 @@
 OBJECTS_os2 = $(OBJECTS_all)
  
 OBJECTS_os390 = $(OBJECTS_all)
+
+OBJECTS_win32 = $(OBJECTS_all)
 # end replace
 
 $(TARGET_LIB): $(OBJECTS)

Reply via email to