LDC2 -I option results in unresolved externals

2018-10-12 Thread spikespaz via Digitalmars-d-learn
I'm using the latest LDC2 beta, and when running the compiler with -I (Look for imports also in ) it fails with unresolved externals. These are my commands. = $ ldc2 "source\setup.d" -I "source" -J "build\vars" -of "build\bin\setup.exe"

Re: Use nested functions as callbacks with Windows API functions?

2018-10-01 Thread spikespaz via Digitalmars-d-learn
On Monday, 1 October 2018 at 21:03:24 UTC, Boris-Barboris wrote: On Monday, 1 October 2018 at 20:27:43 UTC, spikespaz wrote: I was hoping I could use something more akin to JavaScript's syntax: (void* hWnd, long) => {}. I tried this but I'm getting errors with the signature, it says the

Re: Use nested functions as callbacks with Windows API functions?

2018-10-01 Thread spikespaz via Digitalmars-d-learn
On Monday, 1 October 2018 at 21:03:24 UTC, Boris-Barboris wrote: On Monday, 1 October 2018 at 20:27:43 UTC, spikespaz wrote: I was hoping I could use something more akin to JavaScript's syntax: (void* hWnd, long) => {}. I tried this but I'm getting errors with the signature, it says the

Use nested functions as callbacks with Windows API functions?

2018-10-01 Thread spikespaz via Digitalmars-d-learn
I have the following code, this works. import core.sys.windows.windows: EnumWindows; import std.stdio: writeln; void*[] hWndList; extern (Windows) int callback(void* hWnd, long /* lParams */ ) nothrow { hWndList ~= hWnd;

Entry point errors when using LDC to compile Windows Subsystem module with -m32

2018-09-20 Thread spikespaz via Digitalmars-d-learn
I have a user having issues running my project on their 32-bit Windows install. I thought LDC2 compiled as 32-bit by default, but for some reason the errors persist for him regardless. In attempt to resolve this, I am doing everything that requires 32-bit explicitly. I downloaded a known-good

Is it possible to translate this API's C headers?

2018-09-16 Thread spikespaz via Digitalmars-d-learn
There is a project that I wish to use from D (https://ultralig.ht). It's Electron, but with forked WebKit and the samples are very, very fast. This is a great compromise between wanting to have a very custom interface and not wanting to use the slow Electron/Sciter/Awesomium/WebView. I

Re: Trouble with LDC2 and definition file to hide console?

2018-08-20 Thread spikespaz via Digitalmars-d-learn
On Monday, 20 August 2018 at 13:42:58 UTC, spikespaz wrote: I am trying to add a *.def file to my program to hide the console window on launch, as it doesn't need to display anything to function. It is a Windows only application. [...] Also adding that the linker flag I have stated above

Trouble with LDC2 and definition file to hide console?

2018-08-20 Thread spikespaz via Digitalmars-d-learn
I am trying to add a *.def file to my program to hide the console window on launch, as it doesn't need to display anything to function. It is a Windows only application. I saw at this post (https://forum.dlang.org/post/ilj5vn$ef4$1...@digitalmars.com) that I could either use a linker flag,

Linker error for core.sys.windows.winuser imports when compiling as 64 bit.

2018-06-30 Thread spikespaz via Digitalmars-d-learn
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: