Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Building the latest iconv and libxml2 binaries in Win32

I'm trying to get MinGW and MSYS working so I can build iconv and libxml2 in Windows, but I'm finding ./configure and make are giving lots of BSD/Unix related errors that aren't specific enough to google, and not descriptive enough for me to figure out. Can anybody go through some of the steps needed to get iconv and libxml2 .dll/.lib built on a Win32 machine?

I'm updating the libraries for some software and I fiddled around with this all day today and haven't figured it out. I got the newest libpng, zlib and curl built with no issues but I see there isn't much support or how-to's for these libraries like there was for the others. Any help would be very appreciated, thanks in advance for your time.

James

like image 619
James Reinke Avatar asked Aug 07 '10 04:08

James Reinke


4 Answers

I realize that I may be reviving a dead thread, but...

Something that worked for me was to not compile the shared libs, instead deriving them using the a2dll tool as follows:

./configure --prefix=/mingw --disable-shared make make install

a2dll libiconv.a -o iconv.dll mv -iv iconv.dll /mingw/bin/

like image 153
Deuce Avatar answered Oct 15 '22 06:10

Deuce


Environment mingw32

I was able to compile libxml2 with the help of this post
https://mail.gnome.org/archives/xml/2011-December/msg00005.html
Inside the win32 directory of the unzipped http://xmlsoft.org/sources/libxml2-2.9.1.tar.gz
perform 2 steps as below

cscript configure.js threads:no static:yes compiler:mingw iconv:no prefix=where_you_want_to_install include=where_your_mingw_include_is lib=where_your_mingw_lib_is debug=yes

and then
mingw32-make -f Makefile.mingw


I was able to compile and execute http://xmlsoft.org/examples/reader1.c example using code::blocks on mingw with Windows 7 environment.
Remember to specify -lxml2 and -lws2_32 flags in the "Other linker options" box under "Project build options"

like image 29
markiv Avatar answered Oct 15 '22 05:10

markiv


libxml2 provides JavaScript configure. Look for it in win32 folder. There also is a separate readme file there. Example of building libxml2:

cd win32
cscript.exe configure.js compiler=mingw prefix=D:\soft\Qt\2010.03\mingw  debug=yes static=yes
mingw32-make -f Makefile.mingw

I've downloaded prebuilt iconv and it works for me.

like image 2
Basilevs Avatar answered Oct 15 '22 07:10

Basilevs


you can get the binaries for windows made by Igor Zlatkovic at http://www.zlatkovic.com/libxml.en.html

like image 1
Aragorn Avatar answered Oct 15 '22 07:10

Aragorn