[Gnuwin32-users] Compliation of libiconv under mingw/msys
Provides native Win32 open source ports and utilities
Brought to you by:
gnuwin32
|
From: James M. D. <mdu...@ya...> - 2002-08-23 11:25:21
|
Dear Sirs, I Have installed the lastest cygwin, and mingw. Am running mys 1.0. gcc -v returns : Reading specs from c:/development/mingw32/bin/../lib/gcc-lib/mingw32/2.95.3-6/specs gcc version 2.95.3-6 (mingw special) I am compiling the libiconv from http://belnet.dl.sourceforge.net/sourceforge/gnuwin32/libiconv-1.7-src.zip First I run : make -f makefile.mingw "checking for Cygwin environment... (cached) no checking for mingw32 environment... (cached) yes checking for executable suffix... (cached) .exe checking build system type... i386-pc-mingw32" All looks good : Then I make and get the following error : undefined reference to `WinMain@16' ------------------------------------------------------------- mv -f .libs/localcharset.lo localcharset.lo /bin/sh ../libtool --mode=link gcc -O -o libcharset.la -rpath c:/progra~1/libiconv/lib -version-info 1:0:0 -no-undefined localcharset.lo rm -fr .libs/libcharset.la .libs/libcharset.* .libs/libcharset.* generating symbol list for `libcharset.la' dlltool --export-all --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12 --output-def .libs/libcharset-1.dll-def localcharset.lo sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < .libs/libcharset-1.dll-def > .libs/libcharset.exp if test "x`head -1 .libs/libcharset.exp`" = xEXPORTS; then cp .libs/libcharset.exp .libs/libcharset-1.dll-def; else echo EXPORTS > .libs/libcharset-1.dll-def; _lt_hint=1; cat .libs/libcharset.exp | while read symbol; do set dummy $symbol; case $# in 2) echo " $2 @ $_lt_hint ; " >> .libs/libcharset-1.dll-def;; *) echo " $2 @ $_lt_hint $3 ; " >> .libs/libcharset-1.dll-def;; esac; _lt_hint=`expr 1 + $_lt_hint`; done; fi gcc -O -Wl,--base-file,.libs/libcharset-1.dll-base -Wl,-e,_DllMainCRTStartup@12 -o .libs/libcharset-1.dll localcharset.lo c:\development\mingw32\bin\..\lib\gcc-lib\mingw32\2.95.3-6\..\..\..\..\mingw32\bin\ld.exe: warning: cannot find entry symbol _DllMainCRTStartup@12; defaulting to 00401000 c:/development/mingw32/bin/../lib/gcc-lib/mingw32/2.95.3-6/../../../libmingw32.a(main.o)(.text+0x8d):main.c: undefined reference to `WinMain@16' make[2]: *** [libcharset.la] Error 1 make[2]: Leaving directory `/cygdrive/c/development/dia/native/libiconv-1.7-src/src/libcharset/lib' make[1]: *** [all] Error 2 make[1]: Leaving directory `/cygdrive/c/development/dia/native/libiconv-1.7-src/src/libcharset' make: *** [all] Error 2 ------------------------------------------------------------- If if delete the config.cache, config.status and config.log and reconfigure, or just change the prefix, then this problem goes away. I also setup the config.site as instructed, but this is not needed yet for the low level modules, so I build without it: but had to remove these libs :#-lintl -liconv -liberty and these includes that where not there yet : #INCLUDES=" $INCLUDES -Ic:/development/mingw32/include/libc " I had to delete the config.status, config.cache and config.log for it to build properly. All goes fine untill make install, then I get a strange error : -------------------------------------------------- [....] /usr/bin/install.exe -cpD -m 644 .libs/libcharset.a c:/progra~1/libiconv/lib/libcharset.a ranlib c:/progra c:/progra: No such file or directory c:\development\mingw32\bin\ranlib.exe: make[2]: *** [install] Error 9 make[2]: Leaving directory `/c/development/dia/native/libiconv-1.7-src/src/libcharset/lib' make[1]: *** [install] Error 2 make[1]: Leaving directory `/c/development/dia/native/libiconv-1.7-src/src/libcharset' make: *** [install] Error 2 -------------------------------------------------- It seems that the name gets cut off after the "~". If i reconfigure to : --prefix=c:/mingw/libiconv then the build works ok. You will find my patched version here: http://introspector.sourceforge.net/dia/current_clean.tgz The diff file is here : http://introspector.sourceforge.net/dia/diff_ming I wonder if you have similar problems building the libiconv? I am looking forward to your comments, thanks for the good tools, Mike ===== James Michael DuPont http://introspector.sourceforge.net/ __________________________________________________ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com |