piyush.shourie has asked for the wisdom of the Perl Monks concerning the following question:

Ok, first, let me say I have no experience with C++, so I need simplistic steps to take. I am using ActivePerl 626 on Windows 2000.

Here is what I get when trying to install via CPAN shell "install Text::Iconv":


..... Downloading stuff cut out ..... Text-Iconv-1.2/ Text-Iconv-1.2/README Text-Iconv-1.2/Makefile.PL Text-Iconv-1.2/Changes Text-Iconv-1.2/t/ Text-Iconv-1.2/t/01_charsets.t Text-Iconv-1.2/t/00_load.t Text-Iconv-1.2/Iconv.xs Text-Iconv-1.2/MANIFEST Text-Iconv-1.2/Iconv.pm Text-Iconv-1.2/typemap Removing previously used \.cpan\build\Text-Iconv-1.2 CPAN.pm: Going to build M/MP/MPIOTR/Text-Iconv-1.2.tar.gz Checking if your kit is complete... Looks good Writing Makefile for Text::Iconv Microsoft (R) Program Maintenance Utility Version 1.50 Copyright (c) Microsoft Corp 1988-94. All rights reserved. cp Iconv.pm blib\lib\Text\Iconv.pm AutoSplitting blib\lib\Text\Iconv.pm (blib\lib\auto\Text\Iconv) D:\Perl\bin\Perl.exe -ID:\Perl\lib -ID:\Perl\lib D:\Perl\lib\E +xtUtils/xsubpp -typemap D:\Perl\lib\ExtUtils\typemap -typem ap typemap Iconv.xs > Iconv.xsc && D:\Perl\bin\Perl.exe -ID:\Perl\lib +-ID:\Perl\lib -MExtUtils::Command -e mv Iconv.xsc Iconv.c cl -c -nologo -O1 -MD -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT + -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_S YS -DPERL_MSVCRT_READFIX -O1 -MD -DNDEBUG -DVERSION=\"1.2\" -DXS_V +ERSION=\"1.2\" -ID:\Perl\lib\CORE Iconv.c cl : Command line warning D4029 : optimization is not available in the + standard edition compiler Iconv.c "Running Mkbootstrap for Text::Iconv ()" D:\Perl\bin\Perl.exe -ID:\Perl\lib -ID:\Perl\lib -MExtUtils::C +ommand -e chmod 644 Iconv.bs D:\Perl\bin\Perl.exe "-ID:\Perl\lib" "-ID:\Perl\lib" -MExtUtil +s::Mksymlists -e "Mksymlists('NAME' => 'Text::Iconv', 'DLBA SE' => 'Iconv', 'DL_FUNCS' => { }, 'FUNCLIST' => [], 'IMPORTS' => { +}, 'DL_VARS' => []);" link -out:blib\arch\auto\Text\Iconv\Iconv.dll -dll -nologo -no +defaultlib -release -libpath:"D:\Perl\lib\CORE" -machine:x 86 Iconv.obj D:\Perl\lib\CORE\perl56.lib oldnames.lib kernel32.lib u +ser32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib wsock32.lib +mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib msvcr t.lib -def:Iconv.def Creating library blib\arch\auto\Text\Iconv\Iconv.lib and object blib\arch\auto\Text\Iconv\Iconv.exp Iconv.obj : error LNK2019: unresolved external symbol __imp__libiconv +referenced in function _do_conv Iconv.obj : error LNK2019: unresolved external symbol __imp__libiconv_ +open referenced in function _XS_Text__Iconv_new Iconv.obj : error LNK2019: unresolved external symbol __imp__libiconv_ +close referenced in function _XS_Text__Iconv_DESTROY blib\arch\auto\Text\Iconv\Iconv.dll : fatal error LNK1120: 3 unresolve +d externals NMAKE : fatal error U1077: 'C:\WINNT\system32\cmd.exe' : return code ' +0x460' Stop. D:\Perl\bin\nmake.EXE -- NOT OK Running make test Can't test without successful make Running make install make had returned bad status, install seems impossible

I have also downloaded libiconv-1.9.1 and attempted to follow the directions there ,but I get simular errors with unresolved external symbols and have no idea how to fix.

Thanks for any help, or if some already has this built into a binary and can package to a PPM, that would be great too.

Piyush

Janitored by Arunbear - added code and readmore tags, as per Monastery guidelines

Replies are listed 'Best First'.
Re: Linking error with Text::IConv
by ikegami (Patriarch) on Nov 09, 2004 at 14:15 UTC

    If it requires an external library (libiconv-1.9.1), the linker wasn't told about it. It's only -- Ha! It's the first time I've used "only" to describe a list this long! -- told to import from the objects listed below. libiconv.lib or similar does not appear in that list, but the errors implies it should be. It should be specified in the same place where you specified perl56.lib (seperated by a semi-colon, IIRC).

    Iconv.obj D:\Perl\lib\CORE\perl56.lib oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib msvcrt.lib
Re: Linking error with Text::IConv
by PodMaster (Abbot) on Nov 09, 2004 at 17:49 UTC
Re: Linking error with Text::IConv
by tachyon (Chancellor) on Nov 10, 2004 at 01:28 UTC