[Lazarus] Compiling LCL units via commandline

luciano de souza luchyanus at gmail.com
Wed Jul 25 15:53:36 CEST 2012


I don't mater with less elegant solutions. The most important is to
provide a tool.
yes, I need to read the lpi file. Now I need to understand better how
the neeeded structure. lpi files could be complex, but if only a few
sections of it is necessary, perhaps, it will be simpler than I can
imagine now.
Perhaps, I can execute lazbuild in a TProcess and filter the output to
eliminate some unneeded information.
But if someone has an idea how to compile it only with fpc, yes, it
would be better.
Thank you!


2012/7/25, luciano de souza <luchyanus at gmail.com>:
> Renier,
> I will take off the LCL references from fpc.cfg. If it does not work,
> I will can back to here! Thank you for the help.
>
> Paul,
>
> I thank you for the attention and for the links. I will see them
> carefully. We want to develop an API for voice access based on an
> existing project.
> The first phase is simply practice Pascal. I think some months will be
> pass until we have sufficient experience to start.
> Attatched there is some simple examples. We are producing example
> codes in other to develop skills. The texts are in portuguese, but we
> can esasily know what it does. If someone wants to contribute with any
> example code, I will happy in receiving it.
>
>
>
> 2012/7/25, Paul Breneman <list2010 at brenemanlabs.com>:
>> Hi,
>>
>> You wrote:
>>  > Under certain point of view, our project has an educational focus.
>>  > Blind programers with few or any experience is our public. If the
>>  > first contact with Pascal is complex, people can give up.
>>
>> I've been working on a Free Pascal educational project for more than
>> four and a half years (it still remains more of a collection of pieces
>> rather than something a new user could start with):
>>    http://www.turbocontrol.com/monitor.htm
>>
>> This wiki page has a little overview from the perspective of an embedded
>> system programmer:
>>    http://wiki.freepascal.org/FPC_Embedded_Nutshell
>>
>> The project should help provide an easy first contact as shown on this
>> page (there are new tutorials for Win32 users):
>>    http://www.turbocontrol.com/helloworld.htm
>>
>> The Raspberry Pi is made for educational use and is probably going down
>> in history as the platform that brings many new users to Linux.  I'm
>> hoping to help a lot of those folks to consider using Free Pascal.  I
>> hope to soon add Python (and maybe other language) versions of a few of
>> the projects so a new user can try different things.
>>
>> If there are things I can tweak to help you or other blind programmers
>> please contact me.  For my direct email go to my home page (below my
>> name below) and use the mailto link and use "office" as the user name.
>>
>> Regards,
>> Paul
>>
>> www.TurboControl.com
>>
>>
>> luciano de souza wrote:
>>> Hello listers,
>>>
>>> I am blind and I use Freepascal by means of a screen reader. Recently,
>>> I and other four blind programers wanted to compile a project which
>>> implies the usage of LCL units. The very reduced accessiblity of
>>> Lazarus environment make us to decide to compile everything via FPC.
>>>
>>> fpc project.pp
>>>
>>> Under FPC, it doesn't compile. In spite of the fact FPC is inside the
>>> Lazarus, it does not configured to search for LCL units. So we add in
>>> fpc.cfg:
>>>
>>> -FuC:\lazarus\components
>>> -FuC:\lazarus\components\*
>>> -FUC:\lazarus\lcl
>>> -FUC:\lazarus\lcl\*
>>> -FiC:\lazarus\lcl\include
>>> -FuC:\lazarus\units
>>> -FuC:\lazarus\units\*
>>>
>>> The paths were found, but there is a circular reference between
>>> messages and lmessages.
>>>
>>> Having reported it in a forum, I member told me about lazbuild. I
>>> should manually create a XML file with the project settings and try to
>>> compile again. The same error about circular reference is raised.
>>>
>>> Yes, Lazbuild can be used. But I confess this option strongliy upset
>>> me. Lazbuild calls several routines and after all calls FPC. If you
>>> imagine the screen reader reads all the output, not having a way to
>>> jump the unneeded information, you will evaluate how slow can be the
>>> compilation using Lazbuild. The output of FPC is not so verbose, so
>>> it's prefferable to use FPC without Lazbuild.
>>>
>>> I tried to compile the following example program:
>>>
>>> program e026;
>>> {$mode objfpc}{$H+}
>>>
>>> uses
>>> interfaces, dialogs;
>>>
>>> BEGIN
>>> END.
>>>
>>> Under certain point of view, our project has an educational focus.
>>> Blind programers with few or any experience is our public. If the
>>> first contact with Pascal is complex, people can give up. And the
>>> first contact, according this project, implies the usage of LCL. There
>>> is a Pascal voice system called Dosvox writen in Pascal. It offers a
>>> good set of units for developers. Let me give you an example: the crt
>>> unit was converted into dvcrt unit and syntwriteln in place of only
>>> show a message, can also speak it.
>>>
>>> My conclusion is: I need LCL, but how to compile any code using only
>>> Freepascal? How can I configure my fpc.cfg to search for any unit in
>>> Lazarus folders and compile any type of project? Console? Graphical?
>>>
>>> And to avoid this work, I suggest the standard distribution of Lazarus
>>> includes an FPC configured to compile everything.
>>> The ideal would be to do all in the Lazarus interface, but it's
>>> impossible. Among other reasons, the label of widgets produced by LCL
>>> can't be read by screen readers. But it's subject for another message!
>>>
>>> Regards,
>>>
>>
>>
>> --
>> _______________________________________________
>> Lazarus mailing list
>> Lazarus at lists.lazarus.freepascal.org
>> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>>
>
>
> --
> Luciano de Souza
>


-- 
Luciano de Souza




More information about the Lazarus mailing list