Re: How to compile program from command line on Linux?

Bart via fpc-pascal <[email protected]>
Newsgroups gmane.comp.compilers.free-pascal.general
Message-ID <CAMye31yD7Xrx9u-kznU4fxN6BP8--c_a8weSwkyDat0D-n9+hg@mail.gmail.com>
On Mon, Dec 16, 2024 at 2:21 PM Bo Berglund via fpc-pascal
<[email protected]> wrote:


> Can this be done and in that case how?

Yes, of course it can be done.
Lazarus IDE just calls the compiler with the correct parameters ;-)

If you happen to have a compiled version of lazbuild on the computer
in question it's easy.
Just a lazbuild myproject (not sure if an extension must be given) should do it.
AFAIK you can also specify the build-mode (if your project has
buildmodes) on the commandline.

If you don't have lazbuild, then you have to figure out what to supply
mainly for the unit-paths that are needed (-Fu parameter) to built the
project.
Normally the IDE can tell you that, but you cannot access the IDE.
So you need the path to all units (where *.o and *.ppu) reside (for
e.g. LCL, LazUtils etc.

If you have access to any Lazarus on any PC you can get an idea of how
that looks for a similar project.
Goto Colpiler Options -> Show compiler options.
This will show all parameters that the IDE gives to the compiler,
including all unitpaths.

-- 
Bart
_______________________________________________
fpc-pascal maillist  -  [email protected]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.