[Lazarus] Lazarus Goal

Martin lazarus at mfriebe.de
Wed Nov 11 19:41:32 CET 2009


Brian Prentice wrote:
> On Nov 11, 2009, at 6:18 AM, Vincent Snijders wrote:
>
> I don't believe that Lazarus is an example.  
Ah, Why not? (Well you do not need to believe it, or you don't need a 
reason for disbelief). But why is Lazarus not an example? Which part of 
your question does it not fulfil?

You did ask " If so can someone please provide me with the source code 
of a non trivial program which runs on Windows, Linux and OS X (Intel) "

- Lazarus has the source avail
- It is certainly not trivial.
- It runs on all of the named platforms

As for 'write once, compile anywhere'

- Lazarus does allow you to write apps that fall into this category
- Lazarus does not force you do to so. You are fre to write apps that 
run on selected OS only

That is:
- The LCL is aimed works on all platforms. And it does so in most cases.
 Some features are still under development. See here: 
http://wiki.lazarus.freepascal.org/Roadmap.
 If you find a feature that is supposed to run, but does not, then you 
should report it as a bug.

- Additional Components: Some components are included in Lazarus, many 
others are provided by 3rd parties and can be downloaded.
 Included components should be in asimilar state as the LCL
 3rd party components are not part of lazarus, no statement about them 
is possible

You should look here for more guides how Lazarus is to be used, if you 
aim for cross platform: 
http://wiki.lazarus.freepascal.org/Multiplatform_Programming_Guide

Your attached example...
a) I do not have a Mac, but IIRC Mac OS limits paint to inside the paint 
event (Someone can probably confirm this). Which even if an OS does not 
force it, is a good practice.
b) I only had a very very brief glance at your code, but it looks like 
"DisplayPaint" is called all over the place.

If my Memory on a is right, and my assumption on b is right too, then 
your code is written in a non cross platform way.

'write once, compile anywhere' does in no way mean, that every Windows 
feature (or every use/abuse of features possible in Windows) is 
available on all other platforms.
'write once, compile anywhere'  means that the features provided by the 
LCL, if correctly used are available cross platform (or aimed to be).

Best Regards
Martin


> Here is a program that Compiles and runs under Windows XP and compiles 
> but does not run under OS X on an Intel Mac.
>
> http://linuxenvy.com/bprentice/Lazarus/LazarusSquareCell.zip





More information about the Lazarus mailing list