Re: Problem with libiconv

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux