The "link" is usually done in the ShipName.eqp file. You find something like
[Equipment 6]
NodeName=M03
LinkName=3InchSingle_base_Jp
StartDate=19421231
EndDate=19451231
You then use that LinkName to find the gun. Anything that can search inside the dat files in the Library folder will do, but I use Notepad++, which is easy enough and can "Find all". You will sometimes find that a given named gun - "3InchSingle_base_Jp" in this case - might be named several times. The game usually chooses the first one it encounters in such cases... You are a brave person taking this on... you now can see why this is not done very often... Good luck.