This error may occur if one tries to link to the static library, libiconv.a, instead of the dynamic library, libiconv.dll.a. Make sure libiconv.dll.a is in the same directory as libiconv.a.
Kees Zeelenberg ----- Original Message ----- From: "Wolfgang Jeltsch" <[EMAIL PROTECTED]> To: <gnuwin32-users@lists.sourceforge.net> Sent: Friday, October 27, 2006 10:36 PM Subject: [GnuWin32-Users] undefined references when using libiconv with MinGW > Hello, > > I've written a C program which uses libiconv and wanted it to build on > Windows > XP using MinGW 5.0.0. For both libiconv and libintl, I've downloaded the > “binaries” and the “developer files” ZIP archives. I unpacked all four > ZIP > archives into one common directory C:\Programme\GNUWin32. > > I run the MinGW GCC with options -I C:\Programme\GNUWin32\include, > -L C:\Programme\GNUWin32\lib, -liconv and -lintl. Alas, I still get the > following messages: > > C:\DOKUME~1\leo\LOKALE~1\Temp/ccINbaaa.o(.text+0xb1):darcs.utf8.c: > undefined > reference to `_imp__libiconv_open' > C:\DOKUME~1\leo\LOKALE~1\Temp/ccINbaaa.o(.text+0xf5):darcs.utf8.c: > undefined > reference to `_imp__libiconv' > C:\DOKUME~1\leo\LOKALE~1\Temp/ccINbaaa.o(.text+0x102):darcs.utf8.c: > undefined > reference to `_imp__libiconv_close' > collect2: ld returned 1 exit status > > I also tried to mention the file libiconv.a directly on the command line > as an > archive file to link with which gave the same result as above. I tried > using > -llibiconv in addition to -liconv which made no difference, too. > > Intensive Google searches also didn't reveal anything helpful. > > Can anybody tell me what might be the cause for this problem? > > Best wishes, > Wolfgang > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > GnuWin32-Users mailing list > GnuWin32-Users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gnuwin32-users > ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ GnuWin32-Users mailing list GnuWin32-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnuwin32-users