开发者

undefined reference to #include <iconv.h>,`libiconv_open',`libiconv',`libiconv_close'

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 `libi开发者_JAVA百科conv'

collect2: ld returned 1 exit status`


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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜