Thread overview | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
September 25, 2020 I need "windowsx.d" Someone can send It to me? | ||||
---|---|---|---|---|
| ||||
I need windowsx.d but for I don't know the reason is not in dmd. Someone that have it can send to me? I don't know convert windowsx.h to windowsx.d |
September 25, 2020 Re: I need "windowsx.d" Someone can send It to me? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Marcone | On Friday, 25 September 2020 at 15:03:56 UTC, Marcone wrote:
> I need windowsx.d but for I don't know the reason is not in dmd. Someone that have it can send to me? I don't know convert windowsx.h to windowsx.d
Try to convert C header into D file by dpp tool.
|
September 26, 2020 Re: I need "windowsx.d" Someone can send It to me? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Denis Feklushkin | On Friday, 25 September 2020 at 17:00:04 UTC, Denis Feklushkin wrote: > On Friday, 25 September 2020 at 15:03:56 UTC, Marcone wrote: >> I need windowsx.d but for I don't know the reason is not in dmd. Someone that have it can send to me? I don't know convert windowsx.h to windowsx.d > > Try to convert C header into D file by dpp tool. When I try dpp in this tutorial: Windows Install http://releases.llvm.org/6.0.1/LLVM-6.0.1-win64.exe into C:\Program Files\LLVM\, making sure to tick the "Add LLVM to the system PATH for all users" option. Make sure you have LDC installed somewhere. Compile with dub build --compiler=C:\path\to\bin\ldc2.exe. Copy C:\Program Files\LLVM\bin\libclang.dll next to the d++.exe in the bin directory. When I try this command: Compile with dub build --compiler=C:\path\to\bin\ldc2.exe I get this error: Neither a package description file, nor source/app.d was found in D:\Downloads Please run DUB from the root directory of an existing package, or run "dub init --help" to get information on creating a new package. No valid root package found - aborting. |
September 26, 2020 Re: I need "windowsx.d" Someone can send It to me? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Marcone | On Saturday, 26 September 2020 at 00:40:21 UTC, Marcone wrote:
> On Friday, 25 September 2020 at 17:00:04 UTC, Denis Feklushkin wrote:
>> On Friday, 25 September 2020 at 15:03:56 UTC, Marcone wrote:
>>> I need windowsx.d but for I don't know the reason is not in dmd. Someone that have it can send to me? I don't know convert windowsx.h to windowsx.d
>>
>> Try to convert C header into D file by dpp tool.
>
> When I try dpp in this tutorial:
URL?
If you have DUB and compiler installed try to run:
dub fetch dpp
dub build dpp
dub run dpp -- --help
It works on Linux for me
|
September 26, 2020 Re: I need "windowsx.d" Someone can send It to me? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Denis Feklushkin | On Saturday, 26 September 2020 at 01:43:00 UTC, Denis Feklushkin wrote:
> On Saturday, 26 September 2020 at 00:40:21 UTC, Marcone wrote:
>> On Friday, 25 September 2020 at 17:00:04 UTC, Denis Feklushkin wrote:
>>> On Friday, 25 September 2020 at 15:03:56 UTC, Marcone wrote:
>>>> I need windowsx.d but for I don't know the reason is not in dmd. Someone that have it can send to me? I don't know convert windowsx.h to windowsx.d
>>>
>>> Try to convert C header into D file by dpp tool.
>>
>> When I try dpp in this tutorial:
>
> URL?
>
>
> If you have DUB and compiler installed try to run:
>
> dub fetch dpp
> dub build dpp
> dub run dpp -- --help
>
> It works on Linux for me
Good, but don't work converted file windowsx.h to windowsx.d.
|
September 26, 2020 Re: I need "windowsx.d" Someone can send It to me? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Marcone | On Friday, 25 September 2020 at 15:03:56 UTC, Marcone wrote:
> I need windowsx.d but for I don't know the reason is not in dmd. Someone that have it can send to me? I don't know convert windowsx.h to windowsx.d
windowsx.h is mostly a bunch of macros that forward to functions elsewhere in the SDK. Yes, it's handy, but you can get by without it in case you don't manage to get it translated to D. Open windowsx.h in your editor, find the macro you want to use, look across to the right to see what the macro expands to, and use that in your code instead.
A lot of the macros that simply cast between HBITMAP, HPALETTE, HFONT, HPEN, HGDIOBJ etc are redundant because in D they're all just aliases for void*.
|
September 27, 2020 Re: I need "windowsx.d" Someone can send It to me? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Marcone | On Friday, 25 September 2020 at 15:03:56 UTC, Marcone wrote: > I need windowsx.d but for I don't know the reason is not in dmd. Someone that have it can send to me? I don't know convert windowsx.h to windowsx.d You don't want to just include it? https://atilaoncode.blog/2018/04/09/include-c-headers-in-d-code/ |
September 27, 2020 Re: I need "windowsx.d" Someone can send It to me? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Imperatorn | On Sunday, 27 September 2020 at 07:55:56 UTC, Imperatorn wrote:
> On Friday, 25 September 2020 at 15:03:56 UTC, Marcone wrote:
>> I need windowsx.d but for I don't know the reason is not in dmd. Someone that have it can send to me? I don't know convert windowsx.h to windowsx.d
>
> You don't want to just include it?
>
> https://atilaoncode.blog/2018/04/09/include-c-headers-in-d-code/
Dpp is not able to translate macros (maybe in the future). Macros needs to be translated manually.
Kind regards
Andre
|
September 27, 2020 Re: I need "windowsx.d" Someone can send It to me? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Marcone | On Friday, 25 September 2020 at 15:03:56 UTC, Marcone wrote: > I need windowsx.d but for I don't know the reason is not in dmd. Someone that have it can send to me? I don't know convert windowsx.h to windowsx.d https://wiki.dlang.org/Bindings#Binding_generators |
September 27, 2020 Re: I need "windowsx.d" Someone can send It to me? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Marcone | On Friday, 25 September 2020 at 15:03:56 UTC, Marcone wrote:
> I need windowsx.d but for I don't know the reason is not in dmd. Someone that have it can send to me? I don't know convert windowsx.h to windowsx.d
Maybe it is already available on code.dlang.org?
|
Copyright © 1999-2021 by the D Language Foundation