Search code examples
winapifortranwatcom

WATCOM FORTRAN - referenced Windows API functions are missing


Trying to compile old WATCOM FORTRAN project with an updated set of third-party OBJ files.

Linker sees the third-party functions, but complains about a number (all?) of Windows API functions.

I was adding different LIB and OBJ files found under WATCOM installation directory, that seemed to have appropriate names - nothing is changing in the errors from linker. It starts by saying that referenced GetVersionExA cannot be found, and proceeds with a number of similar messages for other Windows API functions to ReadFile/WriteFile, where it says - too many errors.

I am getting a feeling, that it has something to do with function decorations - "_", "@" etc symbols added to function names, but I may, of course, be wrong.

Any suggestion of where to look or what to try?


Solution

  • Thanks to everybody who has read my question.

    It turned out that I was using an OBJ file (out of available three) meant for Borland/Embarcadero products. The other two were COFF and OMF files suitable for different compilers - the OMF file had decorations of Windows API functions matching the ones in the old kernel32.lib from WATCOM.