[lazarus] Compiler Options
Michael A. Hess
mhess at miraclec.com
Tue Mar 21 23:56:50 EST 2000
Curtis White wrote:
> > For the storage of Lazarus options, I would recommend using
> > something like ~/lazarus/.compileroptions.xml instead.
This should be the only place.
> > In the above directory, these would be user-specific options. The
> > global defaults should go to /etc/lazarus/.compileroptions.xml
This would be bad. In a single user work station this would be OK but
given Linux's multiuser organization and the fact that a business might
want to use FPC with multiple developers I would not be happy if my
defaults settings would change because somebody else set theirs in a
different manor. All of the settings need to be placed in the users home
~/ directory tree.
> I agree with this, but then how do we do it on Windows? I'm not sure
> exactly how to handle this without putting in $IFDEF's to determine if
> we are in Linux or Windows. And I don't think we are using IFDEFs
> like that. So how do I handle this?
The best way is to do what the FCL does. Create 2 seperate files. One
for Linux in a Linux directory and one for Windows in a Win32 directory.
When the program is linked the Makefile will use the correct directory
in it's units setting. The LCL code will just call the same procedure
and the Makefile makes sure the correct .ppu is linked for the correct
platform. In fact we need to do more of this with other items.
If I can ever get my butt in gear and finish it this is how the
TRegistry will work. The Win32 files will use the REAL Windows Registry
and the Linux files will use an XML look alike. The correct .ppu pointed
to linked in by the Makefile.
Some things just have to be coded twice in different files.
==== Programming my first best destiny! ====
Michael A. Hess Miracle Concepts, Inc.
mhess at miraclec.com http://www.miraclec.com
More information about the Lazarus