Compiler Error C2492

'identifier' : 'thread' data may not have dll interface

The specified variable was declared with the thread attribute and with DLL interface. However, the address of the thread variable cannot be known before run-time so it cannot be linked to a DLL import or export.