[Lazarus] Installing Components

Mattias Gaertner nc-gaertnma at netcologne.de
Sun May 30 14:10:11 CEST 2010


On Sun, 30 May 2010 10:28:24 +0100
"Technical" <tech at polypressuk.co.uk> wrote:

> I have a problem with installing components on upgrading from 0.9.26 to 
> 0.9.29.
> 
> I have installed several extra components on the previous versions of 
> Lazarus (0.9.26)
> which allowed grids to be aligned within each cell, and for each column or 
> row to be
> sorted (alphabetically or numerically). Those components cannot now be
> installed using Lazarus 0.9.29 (which I need to access the clipboard for 
> wince) - the error message is "Can't find unit Controls used by AlSortGrid" 
> from the AlSortGrid.pas file. 
>[...]
> Do you have any comments or suggestions please?

Have you create a package for your AlSortGrid.pas?
Has the package as requirement the package LCL?

 
> On investigating this problem in more detail, it seems to be associated with
> the following circumstances :-
> 
> 1) It is when trying to install in Lazarus 0.9.29 / FPC 2.4.1
> 2) It is specific to installing for WinCE - Win32 seems to be OK
> 
> Originally, the component was installed on 0.9.26/2.2.2 for just Win32. Then
> WinCE was added on the same installation and worked OK, with the component
> still appearing on the Component Palette. The applications using this
> component also worked OK for desktop (Win32) and smartphone (WinCE - Windows
> Mobile 6.5).

The IDE runs with win32 and the installed component are compiled for
win32. Packages can be cross compiled. The created ppu files have
the same name, but are completely incompatible. To avoid name clashes,
the created ppu should be put in different output directories. This is
done by using macros in the unit output directory. Default is:

lib/$(TargetCPU)-$(TargetOS)

You can find it in the package editor of your package / compiler
options / Paths.


> 
> On trying the same for Lazarus 0.9.29 / FPC 2.4.1, the component installed 
> OK
> again on the Component Palette and in the (Win32) application with Win32
> installed, but when trying to install WinCE with all the mods required by
> WinCE, the component still appeared on the Component Palette, but it does
> not work in the application running WinCE / Windows Mobile 6.5. The cells of
> the grid do not fill with data, and the grid does not appear correctly on
> the phone - there are no grid lines or cells etc.

Have you tried to reproduce that in a small test program?
If yes, you can provide it and I'm sure people will be able to quickly
find out what is going wrong.

 
> In order to attempt to identify the cause of the problem, I have also tried 
> to install an exact copy of StringGrid on the Component Palette. It installs 
> on the palette OK under Win32, but when trying to install
> it again under WinCE (calling it 'NewStringGrid') and to use the new
> component (identical to StringGrid - a direct descendant) on the WinCE 
> application, the following
> error message appears
> 
> "The project uses target OS=Error: illegal parameter; -Twin32 and CPU=Error:
> illegal parameter; -Twin32,

It means, you have not installed (or no not correctly installed) the
cross compiler and ppu files for wince.


> The system.ppu for this target was not found by the FOC binary directories
> Make sure fpc is installed correctly for this target and the fpc.cfg
> contains the right directories."
> 
> The problem now seems to be less to do with the source code of the new
> component, and more to do with the settings within Lazarus.
> 
> I have tried all obvious combinations, but without success. The same problem
> occurs with new 'virgin' installations of Lazarus / FPC aswell as
> installations added to 0.9.26/2.2.2.
> 
> Has anyone managed to install new components into Lazarus 0.9.29 / FPC 2.4.1
> and successfully run applications using those (visual) components using 
> WindowsCE / Windows Mobile 6.5?
> 
> Any contributions would be gratefully received.

Have you seen this page:
http://wiki.lazarus.freepascal.org/Windows_CE_Interface

Mattias





More information about the Lazarus mailing list