Connecting Claude to Delphi

Prompt: Can I Claude Code build from command line via MSBuild and the analyze the ouptut of the Delphi compiler/msbuild? The compiler is located in c:\Delphi\Delphi 13\bin\dcc32.EXE but I would prefer to pas the dproj file to MsBuild. I think MsBuild is installed here: c:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe

Answer: this requires the user to enable the WSL Interop mode (requires SUDO and WLS restart). Add these lines to “/etc/wsl.conf”:

[interop]
enabled=true
appendWindowsPath=true

Then run:

wsl --shutdown

The create a script called Build.cmd and put this in it:

prompt $p
echo off
cls
call "c:\Delphi\Delphi 13\bin\rsvars.bat"
"MSBuild.exe" "c:\Projects\MyProject.dproj" /t:Build /p:platform=Win32 /p:Configuration=Debug
pause

Now Claude can compile the project.

 

Trying out Claude Code for Delphi

Leave a Comment

Scroll to Top