Thread overview | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
October 05, 2016 uuid.d | ||||
---|---|---|---|---|
| ||||
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. |
October 05, 2016 Re: uuid.d | ||||
---|---|---|---|---|
| ||||
Posted in reply to Manu | 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.d > So, 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. |
October 05, 2016 Re: uuid.d | ||||
---|---|---|---|---|
| ||||
Posted in reply to Adam D. Ruppe | 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:
>>
>> 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
>
>> So, 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.
Sure, I can always work-around problems locally. But my point is, it's not okay how it is.
|
October 05, 2016 Re: uuid.d | ||||
---|---|---|---|---|
| ||||
Posted in reply to Adam D. Ruppe | 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:
>>
>> 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
So, phobos64.lib includes druntime? They're not built separately?
|
October 05, 2016 Re: uuid.d | ||||
---|---|---|---|---|
| ||||
Posted in reply to Manu | 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.
|
October 05, 2016 Re: uuid.d | ||||
---|---|---|---|---|
| ||||
Posted in reply to Manu | 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?
|
October 05, 2016 Re: uuid.d | ||||
---|---|---|---|---|
| ||||
Posted in reply to Manu | 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 |
October 05, 2016 Re: uuid.d | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | 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.html
It 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?
|
October 05, 2016 Re: uuid.d | ||||
---|---|---|---|---|
| ||||
Posted in reply to Manu | https://issues.dlang.org/show_bug.cgi?id=15482 this? |
October 05, 2016 Re: uuid.d | ||||
---|---|---|---|---|
| ||||
Posted in reply to Manu | 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.
|
Copyright © 1999-2021 by the D Language Foundation