Yes, I am looking at the map file, logfiles and using dumpbin.
Essentially my problem can be explained by if I use dumpbin /symbols on the library, I see the symbol defined. For example looking at LINV
COFF SYMBOL TABLE
000 00000000 DEBUG notype Filename | .file
LINV.FOR
005 00000000 SECT5 notype Static | .salfdbg
Section length 400, #relocs 0, #linenums 0, checksum 0
007 00000000 SECT1 notype Static | .text
Section length 3F0, #relocs 2A, #linenums 2C, checksum 0
009 00000000 SECT2 notype Static | .data
Section length 240, #relocs 0, #linenums 0, checksum 0
00B 00000000 SECT1 notype () External | _LINV
tag index 0000000D size 000002B0 lines 00000000 next function 00000013
00D 00000000 SECT1 notype BeginFunction | .bf
line# 0002 end 00000015
00F 00000000 SECT1 notype EndFunction | .ef
line# 003a
011 00000000 SECT5 notype Static | .salfdbg
012 00000000 UNDEF notype () External | _XXJJ##
013 000002B0 SECT1 notype () External | _EI1
tag index 00000015 size 00000140 lines 00000000 next function 00000000
015 000002B0 SECT1 notype BeginFunction | .bf
line# 003c end 00000000
017 00000000 SECT1 notype EndFunction | .ef
line# 0057
019 00000242 SECT5 notype Static | .salfdbg
01A 00000000 UNDEF notype () External | _EXP#X
01B 00000000 UNDEF notype () External | _ALOG#X
String Table Size = 0x0 bytes
But then if I look at the map file of the exe where I am linking in the library I see
Unresolved external references
LINV ...
But then other symbols in the same library are resolved. If I try moving the LINV function to a different file that does seem to contain symbols that are resolved, then suddenly LINV is also resolved. Which makes me think that its nothing to do with LINV, more to do with something going wrong during SLINK in certain instances.
For example in the same library, I have
COFF SYMBOL TABLE
000 00000000 DEBUG notype Filename | .file
SIMPLX.FOR
005 00000000 SECT5 notype Static | .salfdbg
Section length 830, #relocs 0, #linenums 0, checksum 0
007 00000000 SECT1 notype Static | .text
Section length D30, #relocs 1C, #linenums 9A, checksum 0
009 00000000 SECT2 notype Static | .data
Section length 30, #relocs 0, #linenums 0, checksum 0
00B 00000000 SECT1 notype () External | _SIMPLX
tag index 0000000D size 00000780 lines 00000000 next function 00000015
00D 00000000 SECT1 notype BeginFunction | .bf
line# 0004 end 00000017
00F 00000000 SECT1 notype EndFunction | .ef
line# 00c6
011 00000000 SECT5 notype Static | .salfdbg
012 00000000 UNDEF notype () External | _SIMP1
013 00000000 UNDEF notype () External | _SIMP3
014 00000000 UNDEF notype () External | _SIMP2
015 00000780 SECT1 notype () External | _SIMP1
tag index 00000017 size 00000160 lines 00000000 next function 0000001C
017 00000780 SECT1 notype BeginFunction | .bf
line# 00c8 end 0000001E
019 00000000 SECT1 notype EndFunction | .ef
line# 00e4
01B 00000365 SECT5 notype Static | .salfdbg
01C 000008E0 SECT1 notype () External | _SIMP2
tag index 0000001E size 000002A0 lines 00000000 next function 00000023
01E 000008E0 SECT1 notype BeginFunction | .bf
line# 00e5 end 00000025
020 00000000 SECT1 notype EndFunction | .ef
line# 0112
022 000004DB SECT5 notype Static | .salfdbg
023 00000B80 SECT1 notype () External | _SIMP3
tag index 00000025 size 000001B0 lines 00000000 next function 00000000
025 00000B80 SECT1 notype BeginFunction | .bf
line# 0113 end 00000000
027 00000000 SECT1 notype EndFunction | .ef
line# 0131
029 000006EA SECT5 notype Static | .salfdbg
String Table Size = 0x0 bytes
And in the slink map file I see:
00400000 header Linker defined
Address Name File in which defined
...
008592b0 SIMPLX ...
If I then put my LINV subroutine, and put it in the simplx.for file (which is in the same static library as linv.for), the subroutine LINV will be resolved. Although this strange behaviour does seem to workaround the problem, as I have lots of these instances, it is not very pratical.
Is there a way that SLINK can output some more debug on what it might be doing ?