digitalmars.D - Error 42: Symbol Undefined __tls_array
- Robert (14/14) Jun 03 2010 What are these undefined symbols? I don't use any __tls_array stuff or
- Robert (7/10) Jun 03 2010 Somehow the compiler doesn't link phobos.lib. Not sure why because the
- BLS (6/17) Jun 04 2010 to be honest with you, this is just a guess...
- =?iso-8859-1?Q?Robert_M._M=FCnch?= (6/13) Jun 05 2010 Ah, didn't saw this. I have a global static char[] but will try to use
- BLS (6/16) Jun 05 2010 Please let me know what you have figured out. have to deal with WIN API
- Rainer Schuetze (10/23) Jun 04 2010 The thread local storage symbols will always creep in, because they are
- =?iso-8859-1?Q?Robert_M._M=FCnch?= (7/9) Jun 05 2010 That's what I have used. But as posted I had to add the phobos.lib
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 -- Robert M. Münch http://www.robertmuench.de
Jun 03 2010
On 2010-06-03 21:36:18 +0200, Robert <robert.muench robertmuench.de> said: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.Somehow the compiler doesn't link phobos.lib. Not sure why because the compiler dir is in my PATH and SC.INI is in the compiler directory, where the path to the lib is defined relatively... -- Robert M. Münch http://www.robertmuench.de
Jun 03 2010
On 03/06/2010 21:36, 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 2to be honest with you, this is just a guess... what about : __gshared char[] x; bjoern
Jun 04 2010
On 2010-06-05 02:34:10 +0200, BLS said:to be honest with you, this is just a guess... what about : __gshared char[] x; bjoernAh, didn't saw this. I have a global static char[] but will try to use immutable and see if this helps. -- Robert M. Münch http://www.robertmuench.de
Jun 05 2010
On 05/06/2010 13:01, Robert M. Münch wrote:On 2010-06-05 02:34:10 +0200, BLS said:Please let me know what you have figured out. have to deal with WIN API TlsAlloc stuff and I am a bit confused on how to bring D TLS and WIN TLS under one hood. Guess it's the Tls API indexing thing I can't get.. TIA bjoernto be honest with you, this is just a guess... what about : __gshared char[] x; bjoernAh, didn't saw this. I have a global static char[] but will try to use immutable and see if this helps.
Jun 05 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
Jun 04 2010
On 2010-06-05 08:39:04 +0200, Rainer Schuetze said:Are you following http://www.digitalmars.com/d/2.0/dll.html ?Yes, creating a DLL in D that has a C callinterface.The "DLL with a C Interface" works fine for me,That's what I have used. But as posted I had to add the phobos.lib explicitly to the compile command. -- Robert M. Münch http://www.robertmuench.de
Jun 05 2010