Error 42: Symbol Undefined __tls_array

Rainer Schuetze r.sagitario at gmx.de
Fri Jun 4 23:39:04 PDT 2010


The thread local storage symbols will always creep in, because they are 
used by the phobos initialization.

IIRC the definition for the symbols is not in phobos, but in snn.lib, 
the C runtime library.

Are you following http://www.digitalmars.com/d/2.0/dll.html ?

The "DLL with a C Interface" works fine for me, but the "D code calling 
D code in DLLs" is rather old, if not broken. I've proposed

http://d.puremagic.com/issues/show_bug.cgi?id=4071

so all phobos objects and the GC can be shared between DLLs.


Robert wrote:
> What are these undefined symbols? I don't use any __tls_array stuff or 
> so. I have a "char[]" array in may code but nothing more. And I import 
> core.runtime as I compile a DLL.
> 
> OPTLINK (R) for Win32  Release 8.00.2
> Copyright (C) Digital Mars 1989-2009  All rights reserved.
> http://www.digitalmars.com/ctg/optlink.html
> ext-test.obj(ext-test)
> Error 42: Symbol Undefined __tls_array
> ext-test.obj(ext-test)
> Error 42: Symbol Undefined __tls_index
> --- errorlevel 2
> 


More information about the Digitalmars-d mailing list