| |
| Posted by Richard (Rikki) Andrew Cattermole in reply to DLearner | PermalinkReply |
|
Richard (Rikki) Andrew Cattermole
Posted in reply to DLearner
| On 30/10/2024 1:23 AM, DLearner wrote:
> On Tuesday, 29 October 2024 at 00:10:17 UTC, Richard (Rikki) Andrew Cattermole wrote:
>> https://github.com/dlang/dmd/blob/ dbba866c71db5e1222a1b631b3e910f1a0811732/compiler/src/dmd/link.d#L1332
>>
>> cl.exe comes from Visual Studio (MSVC).
>>
>> If you haven't got it installed, that'll be why.
>>
>> Otherwise its related to dmd not being able to find it.
>
> Thank you.
> I installed Visual Studio 2022, proved the existence of cl.exe, and added the location to the search path.
>
> However, there is still a problem:
> ```
> dmd hello.c
> C:\D\dmd2\windows\bin64\..\..\src\druntime\import\importc.h(134): fatal error C1034: sal.h: no include path set
> Error: C preprocess command cl.exe failed for file hello.c, exit status 2
>
> ```
>
> which looks like dmd found cl.exe, but did not supply it with all the data it required.
Don't add cl.exe directly to your PATH variable, there are other stuff in the environment variables that has to be setup for it to operate (sigh).
If dmd can't find it, via the VS lookup and get it working, you'll need to as ryuukk said, run dmd inside of cmd prompt that has the Visual Studio tools batch script run in it. Found in your start menu under Visual Studio (version).
|