On Thursday, 10 June 2021 at 15:19:27 UTC, kinke wrote:
Confirmed: https://issues.dlang.org/show_bug.cgi?id=22014
Thank you for the bug report. I'm glad I couldn't handle it
myself.
The only thing that bothers me is that there is no sign of this
problem being fixed.
I fear that this may
On Thursday, 10 June 2021 at 13:19:34 UTC, dokutoku wrote:
The reason seems to be that WCHAR should be mangled with
wcha_t, but it is mangled with chat16_t.
Confirmed: https://issues.dlang.org/show_bug.cgi?id=22014
Wrt. `tagRECT`, this should come in handy (for a druntime fix):
On Thursday, 10 June 2021 at 13:19:34 UTC, dokutoku wrote:
I still haven't solved this problem.
Not sure if this is the issue, but you don't need `extern` on
these. You already have the `extern(C++)` thing at the top of the
file.
```d
extern void str_test(LPCSTR str1);
It's been a while since then, but the problem with the structure
has been solved.
The reason seems to be that the structure name defined in
core.sys.windows.windef was not tagRECT.
I was able to get it to compile by adding a custom definition as
follows
```d
extern (C)
struct tagRECT
{
I tried to use a function from a library written in C++ in D.
I've been trying to use it in D. But I got an error in LNK2019
and the build failed.
So I created a simple static library as follows and built it.
```cpp
#pragma once
#include
namespace static_test {
void str_test(LPCSTR