filipd has asked for the wisdom of the Perl Monks concerning the following question:

I'm unable to install Perl Module sapnwrfc on my Windows platform. When using cpan utility (Strawberry 5.22.0) , I get following error me +ssage : C:\Temp\nwrfcsdk\lib\sapnwrfc.lib: error adding symbols: File format n +ot recognized collect2.exe: error: ld returned 1 exit status dmake: Error code 129, while making '..\..\blib\arch\auto\SAPNW\Conne +ction\Connection.xs.dll' dmake.exe: Error code 255, while making 'subdirs' PIERS/sapnwrfc-0.37.tar.gz C:\Strawberry\c\bin\dmake.exe -- NOT OK Can somebody help me out ? My platform is Windows 7 x86 - 64 bit Strawberry Perl 5.22.0 64-bit

Replies are listed 'Best First'.
Re: Install Perl module sapnwrfc on Windows
by syphilis (Archbishop) on Aug 11, 2015 at 10:49 UTC
    C:\Temp\nwrfcsdk\lib\sapnwrfc.lib: error adding symbols: File format not recognized
    collect2.exe: error: ld returned 1 exit status


    This is very similar to the error reported in Re^2: Tcl for Strawberry Perl on Windows 64bit:

    C:\Tcl\lib\tcl86.lib: error adding symbols: File format not recognized
    collect2.exe: error: ld returned 1 exit status

    A fix to that problem is laid out in this post in that thread.
    Update: If it's not readily apparent, the gendef and dlltool commands will create a new import lib (from the dll) that *is* compatible with MinGW.

    (Seems that MSVC-generated import libs are incompatible with MInGW.)

    There was an additional issue in that thread (regarding the wrong zlib1.dll) but that's not relevant here.

    Cheers,
    Rob
      Thanks ! : your tip pointed me in the right direction. Issue solved
Re: Install Perl module sapnwrfc on Windows
by shmem (Chancellor) on Aug 11, 2015 at 10:13 UTC
    C:\Temp\nwrfcsdk\lib\sapnwrfc.lib: error adding symbols: File format not recognized

    Do you have the correct NW RFC SDK for SAP NewWeaver for your client architecture? You need the one for Windows, even if your SAP system runs on Linux/UNIX.

    perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'