Windows: strange linker error "fatal error LNK1377"

Alexander roland.taverner at gmail.com
Tue Jun 9 21:01:10 UTC 2026


I get error message from linker
```
windows.lib(core_1dba_4299.obj) : fatal error LNK1377: 
'_D7windows5win322ui5shell15NOTIFYICONDATAW6__initZ' symbol not 
found in object. The containing library is corrupt.
Error: linker exited with status 1377
```

So I have the folowing code
```
shared class MessageLoop
{
   private bool createTrayIcon()
   {
     NOTIFYICONDATAW nid; // This causes error LNK1377
     NOTIFYICONDATAW nid = NOTIFYICONDATAW(); // this is OK
     // Fill and use nid here
   }

   private NOTIFYICONDATAW nid; // this is OK
}

NOTIFYICONDATAW nid; // this is OK
```
NOTIFYICONDATAW is just plain simple struct, nothing special
```
version(X86_64)
{
     struct NOTIFYICONDATAW
     {
         uint              cbSize;
         HWND              hWnd;
         uint              uID;
         NOTIFY_ICON_DATA_FLAGS uFlags;
         uint              uCallbackMessage;
         HICON             hIcon;
         wchar[128]        szTip;
         NOTIFY_ICON_STATE dwState;
         NOTIFY_ICON_STATE dwStateMask;
         wchar[256]        szInfo;
         union
         {
             uint uTimeout;
             uint uVersion;
         }
         wchar[64]         szInfoTitle;
         NOTIFY_ICON_INFOTIP_FLAGS dwInfoFlags;
         GUID              guidItem;
         HICON             hBalloonIcon;
     }
}
```
defined in static library.
Is this a bug?


More information about the Digitalmars-d-learn mailing list