I take that back; silly mistake on my end. I used writeln in a
callback, but since no output was generated, I just assumed it didn't
work... but the issue was of course Phobos not being initialized.

So in other words, this seems to work perfectly fine. Thanks for the
input, everyone.

Regards,
Alex

On Fri, Jan 20, 2012 at 10:01 AM, Rainer Schuetze <[email protected]> wrote:
>
> Are you sure? Please check by generating the map file with "-map -L/MAP:FULL
> -L/XREF". For me, the tlsdata module is no longer linked in and the symbols
> are taken from the D file.
>
> Please note that the generated executable does not run correctly, you have
> to fill the _tls_used struct as shown by Walters' code snippet.
>
> Rainer
>
>
> On 20.01.2012 09:52, Alex wrote:
>>
>> Redefining both links fine, but the one from snn.lib seems to be
>> picked over my definition. Code:
>>
>> __gshared extern(C) int _tls_used = 0;
>> __gshared extern(C) int _tls_index = 0;
>>
>> int main()
>> {
>>     return _tls_used + _tls_index;
>> }
>>
>> Regards,
>> Alex
>>
>> On Fri, Jan 20, 2012 at 9:33 AM, Rainer Schuetze<[email protected]>
>>  wrote:
>>>
>>> You have to redefine both symbols _tls_index and _tls_used.
>>>
>>>
>>> On 20.01.2012 08:41, Alex wrote:
>>>>
>>>> This doesn't seem to work:
>>>>
>>>> __gshared extern(C) int _tls_used = 0;
>>>>
>>>> int main()
>>>> {
>>>>     return _tls_used;
>>>> }
>
>
> _______________________________________________
> dmd-internals mailing list
> [email protected]
> http://lists.puremagic.com/mailman/listinfo/dmd-internals
_______________________________________________
dmd-internals mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/dmd-internals

Reply via email to