ImportC question

ryuukk_ ryuukk.dev at gmail.com
Wed Oct 30 16:31:45 UTC 2024


On Wednesday, 30 October 2024 at 15:17:56 UTC, DLearner wrote:
> On Wednesday, 30 October 2024 at 09:21:55 UTC, ryuukk_ wrote:
>> On Tuesday, 29 October 2024 at 20:26:58 UTC, DLearner wrote:
>>> On Tuesday, 29 October 2024 at 18:57:15 UTC, Salih Dincer 
>>> wrote:
>>>> On Monday, 28 October 2024 at 20:56:03 UTC, DLearner wrote:
>>>>> Just trying ImportC under Windows 10:
>>>>> ```c
>>>>> #include <stdio.h>
>>>>>
>>>>> int main()
>>>>> {
>>>>>    printf("Hello world.\n");
>>>>>    return 0;
>>>>> }
>>>>> ```
>>>>>
>>>>> Produces
>>>>> ```
>>>>> dmd hello.c
>>>>> failed launching cl.exe /P /Zc:preprocessor /PD /nologo 
>>>>> hello.c 
>>>>> /FIC:\D\dmd2\windows\bin64\..\..\src\druntime\import\importc.h /Fihello.i
>>>>> Error: C preprocess command cl.exe failed for file hello.c, 
>>>>> exit status 1
>>>>> ```
>>>>
>>>> DMD Compiler version?
>>>>
>>>> SDB at 79
>>>
>>> ```
>>> C:\Users\SoftDev>dmd
>>> DMD64 D Compiler v2.106.0-dirty
>>> ```
>>
>> update your compiler, latest version is: 2.109.1
>>
>>
>> then, and only then you can start wondering what's broken
>
> Now upgraded.
>
> 1. I noticed that the installation process also installed 
> _both_ Visual Studio 2019 _and_ Visual Studio 2022.  Is one of 
> these preferred?
>
> 2. With 2019:
> ```
> C:\Program Files (x86)\Microsoft Visual 
> Studio\2019\Community>dmd 
> C:\Users\SoftDev\Documents\BDM\Projects\IT\C\hello.c
>
> C:\Program Files (x86)\Microsoft Visual Studio\2019\Community>
> ```
> ie silence (and no 'hello' files produced either).
>
> 3. With 2022:
>
> ```
> C:\Program Files\Microsoft Visual Studio\2022\Community>dmd 
> C:\Users\SoftDev\Documents\BDM\Projects\IT\C\hello.c
> C:\Program Files (x86)\Windows 
> Kits\10\include\10.0.22000.0\shared\driverspecs.h(381): warning 
> C4005: '_Kernel_acquires_resource_': macro redefinition
> C:\Program Files (x86)\Windows 
> Kits\10\include\10.0.22000.0\shared\no_sal2.h(876): note: see 
> previous definition of '_Kernel_acquires_resource_'
> C:\Program Files (x86)\Windows 
> Kits\10\include\10.0.22000.0\shared\driverspecs.h(391): warning 
> C4005: '_Kernel_releases_resource_': macro redefinition
> ```
> and a large number of similar messages.

why X86 brother, pick the developper prompt for X64



More information about the Digitalmars-d-learn mailing list