Thread overview | |||||
---|---|---|---|---|---|
|
April 09, 2020 Link error undefined symbol: __imp__InterlockedIncrement@4 on windows | ||||
---|---|---|---|---|
| ||||
I'm trying to compile my first hello world dub project, but when I run "dub" it spits this error: lld-link: error: undefined symbol: __imp__InterlockedIncrement@4 Does anybody have any clues what is going on ? |
April 11, 2020 Re: Link error undefined symbol: __imp__InterlockedIncrement@4 on windows | ||||
---|---|---|---|---|
| ||||
Posted in reply to Clayton Alves | On Thursday, 9 April 2020 at 14:07:10 UTC, Clayton Alves wrote: > I'm trying to compile my first hello world dub project, but when I run "dub" it spits this error: > > lld-link: error: undefined symbol: __imp__InterlockedIncrement@4 > > Does anybody have any clues what is going on ? This is from WinAPI, a very common one https://docs.microsoft.com/en-us/windows/win32/api/winnt/nf-winnt-interlockedincrement It seems shipped version of kernel32.lib is missing that symbol. If you don't mind installing Windows SDK and build tools this is usually the way to go. On the other hand if you are specifically looking to use minimal as possible setup you could also try LDC (assuming you've been using DMD) |
April 13, 2020 Re: Link error undefined symbol: __imp__InterlockedIncrement@4 on windows | ||||
---|---|---|---|---|
| ||||
Posted in reply to evilrat | On Saturday, 11 April 2020 at 05:45:37 UTC, evilrat wrote:
> On Thursday, 9 April 2020 at 14:07:10 UTC, Clayton Alves wrote:
>> I'm trying to compile my first hello world dub project, but when I run "dub" it spits this error:
>>
>> lld-link: error: undefined symbol: __imp__InterlockedIncrement@4
>>
>> Does anybody have any clues what is going on ?
>
> This is from WinAPI, a very common one
> https://docs.microsoft.com/en-us/windows/win32/api/winnt/nf-winnt-interlockedincrement
>
> It seems shipped version of kernel32.lib is missing that symbol. If you don't mind installing Windows SDK and build tools this is usually the way to go.
>
> On the other hand if you are specifically looking to use minimal as possible setup you could also try LDC (assuming you've been using DMD)
Thank you @evilrat,
After reinstalling windows SDK and build tools the error is gone.
|
Copyright © 1999-2021 by the D Language Foundation