Page 1 of 1

undefined reference to `libiconv'

Posted: 05 Jun 2007 16:17
by jklanka
Hi,

I am trying to compile and install VLC-Trunk with Fedora Core 6.

inside the VLC- folder I can succussfully run ./configure.

But then when I run make, I am getting following error.

ib/lib src/.libs/libvlc.so -L/usr/local/lib -lrt -lpthread -ldl -L/home/vlc/vlc-trunk/extras/contrib/lib -Wl,--rpath -Wl,/usr/local/lib
src/.libs/libvlc.so: undefined reference to `libiconv'
src/.libs/libvlc.so: undefined reference to `libiconv_close'
src/.libs/libvlc.so: undefined reference to `libiconv_open'
collect2: ld returned 1 exit status
make[2]: *** [vlc] Error 1
make[2]: Leaving directory `/home/vlc/vlc-trunk'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/vlc/vlc-trunk'
make: *** [all] Error 2


Then I installed the package libiconv from http://www.gnu.org/software/libiconv/ .

But still I am getting the same error.

Please help me on this to sort out and go further.

Thanks

Posted: 05 Jun 2007 16:41
by Jean-Baptiste Kempf
Did you make completely the contribs ?

Posted: 05 Jun 2007 17:05
by jklanka
Yes I did complete the contrib.

Posted: 05 Jun 2007 17:09
by Jean-Baptiste Kempf
add a -liconv

Posted: 06 Jun 2007 10:11
by jklanka
Really thanks for your reply.

1)
But I could not find and install liconv and is it a part of glib?
Can you please give me some info about it?

But if I configure with --disable-libtool option and I could compile and make install succcessfully.

2)
I am trying to run the Java samples with Eclipse Editor. So that I addedd the --enable-java-bindings option to configure line.

Do I need to go to /vlc-trunk folder/bindings and make and make install again to create the libjvlc packages. Please varify me whether I am going in the right track

Thanks

Posted: 06 Jun 2007 15:04
by jklanka
Hi,

I ran make and make install under vlc-trunk/bindings folder. It is not creating libjvlc.so.

Please help

Posted: 10 Jun 2007 16:40
by jklanka
Can you please tell me how to add -liconv

Re: undefined reference to `libiconv'

Posted: 03 Apr 2008 17:45
by philo
I had the same probleme with liconv and libiconv.so

to get everything correct I had to configure vlc compilation with :
/configure : ./configure --with-ffmpeg-tree=./extras/ffmpeg --enable-libtool --disable-wxwidgets --disable-skins2
The important option is --enable-libtool without it I couldn't have any libvlc.so and proper libiconv.so.2
It seems that on ubuntu, libtool are enabled by default but not on mandriva...

Then during the complilation of the code which call libvlc (and generates the error undefined reference to `libiconv' )
you need to specify the path of libiconv :

compilation exemple : gcc -I/home/user/Desktop/vlc/instal/include/ -lvlc -liconv -L/home/user/Desktop/vlc/vlc/extras/contrib/lib/ -L/home/user/Desktop/vlc/vlc/src/.libs main.c -o demo

-Imust be followed by the path to all the headers (.h) installed by vlc
-lvlc -liconv mean you want to link to those library and
-Lmust be followed by the paths to those library (.so) installed by vlc

to set exactly a instalation file, you can add the option : --prefix=the/path/you/want at the end of the ./configure line
in my case its : /home/user/Desktop/vlc/instal/

Re: undefined reference to `libiconv'

Posted: 07 Apr 2008 03:48
by kwizart
Be "carefull" with Fedora Core 6, This release is unsupported anymore by the fedoraproject.org as it is now "end of life".