Thread overview | |||||
---|---|---|---|---|---|
|
November 22, 2004 __init_ vs _init_ | ||||
---|---|---|---|---|
| ||||
Does anyone know why D sometimes generates symbol names of the form __init_10Typeinfo_i vs _init_10Typeinfo_i (note the number of leading underscores). I'm trying to debug various Win32 linking error using MinTL that seem to depend on its use of combinations of mixins and typeid and vararg code. When I get a link error it is looking for the _init_ with one underscore and everything works fine when it looks for __init_ with two underscores. I've reverted to DMD-102 and the link errors go away but even with 106 I still get them. Currently I've started commenting out MinTL code to get something that works. On Linux everything seems ok. -Ben |
November 22, 2004 Re: __init_ vs _init_ | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ben Hinkle | "Ben Hinkle" <bhinkle@mathworks.com> wrote in message news:cntgca$jq7$1@digitaldaemon.com... > Does anyone know why D sometimes generates symbol names of the form __init_10Typeinfo_i vs _init_10Typeinfo_i (note the number of leading underscores). I'm trying to debug various Win32 linking error using MinTL that seem to depend on its use of combinations of mixins and typeid and vararg code. When I get a link error it is looking for the _init_ with one underscore and everything works fine when it looks for __init_ with two underscores. I've reverted to DMD-102 and the link errors go away but even with 106 I still get them. Currently I've started commenting out MinTL code > to get something that works. On Linux everything seems ok. Are you trying to hook up to an import library written in D? |
November 22, 2004 Re: __init_ vs _init_ | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | "Walter" <newshound@digitalmars.com> wrote in message news:cnthc7$lnt$1@digitaldaemon.com... > > "Ben Hinkle" <bhinkle@mathworks.com> wrote in message news:cntgca$jq7$1@digitaldaemon.com... > > Does anyone know why D sometimes generates symbol names of the form __init_10Typeinfo_i vs _init_10Typeinfo_i (note the number of leading underscores). I'm trying to debug various Win32 linking error using MinTL > > that seem to depend on its use of combinations of mixins and typeid and vararg code. When I get a link error it is looking for the _init_ with one > > underscore and everything works fine when it looks for __init_ with two underscores. I've reverted to DMD-102 and the link errors go away but even > > with 106 I still get them. Currently I've started commenting out MinTL > code > > to get something that works. On Linux everything seems ok. > > Are you trying to hook up to an import library written in D? > It doesn't seem to matter if I use a library or list the relevant files explicitly: The symbol is defined in phobos with two underscores. By some combinations my object file sometimes ends up needing _init and sometimes ends up with __init. I've been trying to get simple reproduction steps but it seems pretty complicated. In MinTL it could involve three modules with a couple mixins and possible vararg functions (comparing against _arguments so it could be that _arguments is the first time the symbol is hit). Scatter throughout are typeid(T) where T is "int" (not that "int" is important - any type will do). |
Copyright © 1999-2021 by the D Language Foundation