Linking to SDL.dll

I’ve just reactivated my free Borland C++ 5.5 compiler after some years in
order to recompile some SDL-based software.

When linking the executable with SDL.dll 1.2.13, the following message appears:

“Error: Unresolved external ‘_SDL_GetError’ referenced from …”

The reason seems to be the way this function is exported from the DLL
(or, at least, handled by IMPLIB when creating SDL.lib from SDL.dll).

According to TDUMP it is “imported by ordinal”, not by name.
As a consequence, its internal name is “SDL_GetError” without a leading
underscore (in contrast to all other functions having such a leading underscore).

Oddly enough, it is the only function that is handled this (ordinal) way. Why?

Would it be possible to provide a SDL.dll where all functions
are exported by name?

“Error: Unresolved external ‘_SDL_GetError’ referenced from …”

The reason seems to be the way this function is exported from the DLL
(or, at least, handled by IMPLIB when creating SDL.lib from SDL.dll).

Indeed, there seems to be a bug in IMPLIB (possibly in ILINK32, too).

I solved the problem by an intermediate IMPDEF step:

IMPDEF -a SDL.def SDL.dll
IMPLIB -c SDL.lib SDL.def

Linking worked flawlessly after that. Apparently, the DLL extraction routine in
IMPDEF does not have the bug.