How do I link glibc's implementation of iconv?
问题 The GNU C library provides an implementation of iconv - how do I use it? Simple program: #include <iconv.h> int main( int argc, char **argv ) { iconv_t cd = iconv_open( "UTF-8", "ISO-8859-1" ); iconv_close( cd ); return 0; } Compile and link: $ gcc -Wall iconv.c -o iconv /tmp/ccKAfXNg.o: In function `main': iconv.c:(.text+0x19): undefined reference to `libiconv_open' iconv.c:(.text+0x29): undefined reference to `libiconv_close' collect2: ld returned 1 exit status List the symbols to show they