digitalmars.D - uuid.d
- Manu via Digitalmars-d (32/32) Oct 04 2016 I have this weird link error going on:
- Adam D. Ruppe (6/12) Oct 04 2016 They are in the druntime src, core.sys.windows.uuid
- Manu via Digitalmars-d (4/16) Oct 04 2016 Sure, I can always work-around problems locally. But my point is, it's
- Adam D. Ruppe (9/10) Oct 04 2016 Eh, I tend to stop at "works for me" so I can't do much else.
- Manu via Digitalmars-d (3/10) Oct 04 2016 So, phobos64.lib includes druntime? They're not built separately?
- Adam D. Ruppe (3/5) Oct 04 2016 They are built separately, but bundled together at the last step
- Walter Bright (4/4) Oct 05 2016 You can find out what symbols are defined where in a library by using th...
- Manu via Digitalmars-d (12/16) Oct 05 2016 It was also written in the error:
- Walter Bright (2/6) Oct 05 2016 I don't know, I didn't write that module.
- Temtaime (4/12) Oct 05 2016 Please, remove that ugly module.
- Adam D. Ruppe (8/9) Oct 05 2016 You don't want to remove it, then you'd just get symbol undefined
- Kagamin (1/1) Oct 05 2016 https://issues.dlang.org/show_bug.cgi?id=15482 this?
I have this weird link error going on: 1>dxguid.lib(dxguid.obj) : error LNK2005: IID_IDirectSoundCapture already defined in phobos64.lib(uuid.obj) 1>dxguid.lib(dxguid.obj) : error LNK2005: IID_IDirectSoundCaptureBuffer already defined in phobos64.lib(uuid.obj) 1>dxguid.lib(dxguid.obj) : error LNK2005: DPLPROPERTY_MessagesSupported already defined in phobos64.lib(uuid.obj) 1>dxguid.lib(dxguid.obj) : error LNK2005: DPLPROPERTY_LobbyGuid already defined in phobos64.lib(uuid.obj) 1>dxguid.lib(dxguid.obj) : error LNK2005: DPLPROPERTY_PlayerGuid already defined in phobos64.lib(uuid.obj) 1>dxguid.lib(dxguid.obj) : error LNK2005: DPLPROPERTY_PlayerScore already defined in phobos64.lib(uuid.obj) 1>dxguid.lib(dxguid.obj) : error LNK2005: IID_IDirectSoundNotify already defined in phobos64.lib(uuid.obj) etc, for pages and pages... I expect to find these symbols in dxguid.lib, so I link the lib, and it's saying they're already defined in phobos64.lib... wtf? I checked std/uuid.d and there's nothing of the sort defined in there... I can't find any mention of these symbols anywhere in the phobos source. Can any phobos dev's suggest how this mountain of guid symbols might find its way into phobos? I figured "okay, I guess I don't need to link dxguid.lib", so I didn't, and it did resolve 99% of the symbols... except I have 4 left: 2>error LNK2001: unresolved external symbol IID_IDirectInput8W 2>error LNK2001: unresolved external symbol IID_IDirectSoundBuffer8 2>error LNK2001: unresolved external symbol WKPDID_D3DDebugObjectName 2>error LNK2001: unresolved external symbol WKPDID_D3DDebugObjectName So, dxguid.lib appears to be mutually exclusive with phobos64.lib, except that phobox64.lib is incomplete... I can't link.
Oct 04 2016
On Wednesday, 5 October 2016 at 01:57:35 UTC, Manu wrote:it's saying they're already defined in phobos64.lib... wtf? I checked std/uuid.d and there's nothing of the sort defined in there...They are in the druntime src, core.sys.windows.uuid https://github.com/dlang/druntime/blob/master/src/core/sys/windows/uuid.dSo, dxguid.lib appears to be mutually exclusive with phobos64.lib, except that phobox64.lib is incomplete... I can't link.I'm not sure what the best solution is, but one you could do is just take the missing ones and define them in your own file, then link with phobos but not with dxguid.
Oct 04 2016
On 5 October 2016 at 12:12, Adam D. Ruppe via Digitalmars-d <digitalmars-d puremagic.com> wrote:On Wednesday, 5 October 2016 at 01:57:35 UTC, Manu wrote:Sure, I can always work-around problems locally. But my point is, it's not okay how it is.it's saying they're already defined in phobos64.lib... wtf? I checked std/uuid.d and there's nothing of the sort defined in there...They are in the druntime src, core.sys.windows.uuid https://github.com/dlang/druntime/blob/master/src/core/sys/windows/uuid.dSo, dxguid.lib appears to be mutually exclusive with phobos64.lib, except that phobox64.lib is incomplete... I can't link.I'm not sure what the best solution is, but one you could do is just take the missing ones and define them in your own file, then link with phobos but not with dxguid.
Oct 04 2016
On Wednesday, 5 October 2016 at 02:34:52 UTC, Manu wrote:Sure, I can always work-around problems locally.Eh, I tend to stop at "works for me" so I can't do much else. They'd prolly accept a PR adding the other guids to the druntime file though without real hassle, though I wonder if they should actually be listed there as they are now, or if they should be redefined to be `extern` so it always loads the actual symbol off the system dll. I imagine extern is the way to go... but I don't know why they didn't do it that way originally. Are all those guids in the system libs?
Oct 04 2016
On 5 October 2016 at 12:12, Adam D. Ruppe via Digitalmars-d <digitalmars-d puremagic.com> wrote:On Wednesday, 5 October 2016 at 01:57:35 UTC, Manu wrote:So, phobos64.lib includes druntime? They're not built separately?it's saying they're already defined in phobos64.lib... wtf? I checked std/uuid.d and there's nothing of the sort defined in there...They are in the druntime src, core.sys.windows.uuid https://github.com/dlang/druntime/blob/master/src/core/sys/windows/uuid.d
Oct 04 2016
On Wednesday, 5 October 2016 at 02:35:27 UTC, Manu wrote:So, phobos64.lib includes druntime? They're not built separately?They are built separately, but bundled together at the last step for distribution.
Oct 04 2016
You can find out what symbols are defined where in a library by using the lib program: lib -l phobos64.lib http://www.digitalmars.com/ctg/lib.html
Oct 05 2016
On 5 October 2016 at 17:27, Walter Bright via Digitalmars-d <digitalmars-d puremagic.com> wrote:You can find out what symbols are defined where in a library by using the lib program: lib -l phobos64.lib http://www.digitalmars.com/ctg/lib.htmlIt was also written in the error: error LNK2005: IID_IDirectSoundNotify already defined in phobos64.lib(uuid.obj) Ie, uuid.obj, so I looked in phobos uuid.d and saw nothing. Turns out there's another uuid.d in druntime too, and druntime+phobos are aggregated into phobos64.lib... I wouldn't have expected that. It's all good. I do wonder why these uuid's should be in druntime though? The suite present is far from complete, and there are already libs in the windows ecosystem that have these symbols, so is it really useful to define them in druntime?
Oct 05 2016
On 10/5/2016 12:56 AM, Manu via Digitalmars-d wrote:I do wonder why these uuid's should be in druntime though? The suite present is far from complete, and there are already libs in the windows ecosystem that have these symbols, so is it really useful to define them in druntime?I don't know, I didn't write that module.
Oct 05 2016
On Wednesday, 5 October 2016 at 10:37:20 UTC, Walter Bright wrote:On 10/5/2016 12:56 AM, Manu via Digitalmars-d wrote:Please, remove that ugly module. As was said there's already necessary libraries on windows with needed uuids.I do wonder why these uuid's should be in druntime though? The suite present is far from complete, and there are already libs in the windows ecosystem that have these symbols, so is it really useful to define them in druntime?I don't know, I didn't write that module.
Oct 05 2016
On Wednesday, 5 October 2016 at 11:00:19 UTC, Temtaime wrote:Please, remove that ugly module.You don't want to remove it, then you'd just get symbol undefined errors when you use them! The Microsoft headers defined them as extern, ours defined them as regular variables. That's the difference causing the problem. The bug report says the gnu toolchain can't handle the externs.... but since we use the Microsoft one, we should probably do it their way.
Oct 05 2016