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