On Sunday, 1 July 2018 at 01:16:59 UTC, Jonathan M Davis wrote:
On Sunday, July 01, 2018 00:42:30 spikespaz via Digitalmars-d-learn wrote:
Hey guys, I'm getting a linker error when compiling with DMD `-m63` that I don't get as 23 bit.

I'm importing `ShowWindow` from `core.sys.windows.winuser`, and I get the following:

C:\D\dmd2\windows\bin\lld-link.exe: warning: main.obj: undefined
symbol: ShowWindow
error: link failed
Error: linker exited with status 1

My compiler command is `dmd main.d -m64 -i -O -release -inline
-boundscheck=off
`.

I don't think the source code would make a difference other than to say that I'm calling `ShowWindow`.

Any help would be much appreciated. Thanks!

Well, per the MSDN page, that symbol is in User32.lib, so make sure that you're linking against it - though why it would link against it with 32-bit and not 64-bit, I don't know.

- Jonathan M Davis

Check to make sure it's actually defined in user32.lib. I'm having a similar issue and would love to know why these functions are apparently not being defined

https://forum.dlang.org/thread/ncarbitntjeobljra...@forum.dlang.org

Reply via email to