[Lazarus] Compliments

Dennis dec12 at avidsoft.com.hk
Wed Aug 10 07:56:23 CEST 2016

Alfred wrote:
> @Dennis
> I am sorry, but I cannot reproduce your problem.
> I did a fresh install, and all (including cross) runs out-of-the-box !
> However, do you know that you do have to add the following into your 
> lpr-file ?
> program MyCrossProg;
> {$mode objfpc}{$H+}
> {$ifdef Linux}
>   {$ifdef CPUARM}
>     {$linklib GLESv2}
>   {$endif}
>   {$linklib libc_nonshared.a}
>   {$endif}
> {$endif}
> uses
>  ........

Thank you so much. After I added the above, cross linking now works and 
the executable can run on Pi.
By the way, I could not find the above in the git or in any readme file 
in the rar files.  It would be easier for laymen like me to have that 
instruction in a crosscompile.readme file.

If I want to cross compile to another platform like Linux64, what should 
the "defines" be like?

What does {$linklib GLESv2}  mean?
Does it exists on ubuntu for odroid?  It is because the same executable 
can run on raspbian+Pi but when run on ubuntu+Odroid, it reported "bash: 
./hello Permission denied".
I already login as root and chmod +x hello
but still get the permission denied error.

In the past, when I compile an ARM execuatable on odroid, i can run it 
on both ubuntu+odroid or raspbian+Pi.  Is it because of the GLESv2?

Many thanks.

More information about the Lazarus mailing list