I have already set up build and debug environment for Object Pascal inside Visual Studio Code via FPC and GDB, but I just made build process work for programs containing only 1 .pas file via
"command": "fpc",
"args": [ "-g", "-Px86_64", "helloWorld.pas" ],
Now, I need to build quite big Delphi project group (something like solution?) and it contains main project file .groupproj.
Is there a way to build the .groupproj via FPC somehow?
Or at least some workaround like conversion to .lpi and then build via FPC?
Or at least call Delphi compiler/builder from VS Code and build the whole project group via it? (but I don't like this option, because I prefer to not use Delphi)
No. Delphi is not one of the languages that is supported in Visual Studio.
In VS Code, type in “Create C++ Project” in the main prompt. This is a functionality of the Generator extension, which will guide you through the project creation process. Use “Open > Folder” to open the newly created C++ project in VS Code.
OmniPascal - Open Preview - Visual Studio Marketplace Once the extension is installed, go to File → Preferences → Settings and find the “OmniPascal configuration” section under “Extensions”. For the Free Pascal Source Path, enter the path to a folder that contains the Free Pascal source, e.g.
To get some facts straight for other people that might stumble on this:
But luckily the basics are the same
So in worst case, examine the Delphi projects (either in IDE or texteditor) for directories and switches and create either a manual buildscript or a lazarus (.lpi) project.
However it is vital to keep in mind that the default FPC mode is NOT Delphi mode, so always when executing FPC make sure you manually enable Delphi mode (-Sd)
Group project support within Lazarus is very new (as in months), and afaik not even in stable versions yet. Though if you create a bunch of .lpis, a batch file/shellscript with a sequence of lazbuild commands on .lpis might do it.
P.s. throw the VSCode under the bus and use Lazarus.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With