0

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:

Building Makefile: "C:\Dev-Cpp\Examples\eottest\Makefile.win"

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`
4

1 回答 1

3

You're only specifying an additional library path, not the actual library to link to. Try:

gcc.exe eot.o libeot.o properties.o  -o "Project1.exe" -L"C:/Dev-Cpp/lib" -liconv
于 2010-11-28T10:25:43.380 回答