0 down vote favorite


hi, I had a problem with adding reference in my C application. I am unable to add linker reference to "libiconv" in my data compresser project.I have download "libiconv" library but confuse in adding reference which show error in compiling.I'm using Dev C++ for developing my compression apps.

here is the compile log:

Executing  make...

make.exe -f "C:\Dev-Cpp\Examples\eottest\Makefile.win" all

gcc.exe eot.o libeot.o properties.o  -o "Project1.exe" -L"C:/Dev-Cpp/lib" 


libeot.o(.text+0x19):libeot.c: undefined reference to `libiconv_open'
libeot.o(.text+0x36):libeot.c: undefined reference to `libiconv_close'
libeot.o(.text+0x67):libeot.c: undefined reference to `libiconv'

collect2: ld returned 1 exit status`

i have downloaded 'libiconv' library from ftp.gnu.org/gnu/libiconv/libiconv-1.13.1.tar.gz ......after extracting zip file i don't know how to use this library.The "libiconv" folder consists of lots of sub folder.i'm confuse which library should i reference.

First check to see if you have to compile that library yourself, or does it already contain *.lib files that you need. Normally *.tar files were compressed from a *nix distribution, not MS-Windows. With Dev-C++ (which itself is ancient and outdated) you most likely will have to create a static library or DLL project and compile libiconv yourself, which is standard practice when working on *nix.