Rifat Mahmud <rftmhmd@xxxxxxxxx> writes: > My libiconv.so file is in /usr/local/lib and it's a shared library. > How do I compile the source foo.c which contains iconv.h header? I > normally compile like this, 'gcc -Wall -g foo.c -o foo' . I used > 'gcc -Wall -g -I/usr/local/lib foo.c -o foo' . but still there's same > error. Tried with 'gcc -Wall -g -I/usr/local/include foo.c -o foo' , > still the problem persists. As Marc said, you need a -l option. Something like: gcc -Wall -g -o foo foo.c -liconv You may also need -L /usr/local/lib . Ian