digitalmars.D.learn - Linker error for core.sys.windows.winuser imports when compiling as 64
- spikespaz (16/16) Jun 30 2018 Hey guys, I'm getting a linker error when compiling with DMD
- Jonathan M Davis (9/25) Jun 30 2018 Well, per the MSDN page, that symbol is in User32.lib, so make sure that
- Chris M. (5/31) Jul 01 2018 Check to make sure it's actually defined in user32.lib. I'm
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! Also, how does formatting work? Markdown doesn't seem to work, or HTML.
Jun 30 2018
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.Also, how does formatting work? Markdown doesn't seem to work, or HTML.For the web forum you mean? It's just a web client for the newsgroups that we use, and many folks interact with it as a newsgroup or via the mailing list interface rather than through forum.dlang.org. So, it's expected that everything will be in plain text. - Jonathan M Davis
Jun 30 2018
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: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/ncarbitntjeobljragfd forum.dlang.orgHey 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
Jul 01 2018