New compiler: Lazarus

Hi
just to keep you up to date:
I have installed the latest Madrake (now Mandriva) Linux Distro on a new HD on my linux PC (originaly I installed PClinux OS (too lean and simple, no good)
Kylix will not load (too old, and not supported anymore)
so I have downloaded and have got working lazarus (free pascal) compiler (no easy feat) :slight_smile:
(not yet compiling a program, error about lpthread (dependency hell)
(ok, found the dependency to install (thank goodness for Google!)
(now another dependency needed, x11, downloading and installing that)
the good things:
its a cross platform compiler, so it will mean i can install and use it on a Mac as well
its compatible with my WD pascal source code (and even some components hopefully (that I have the source code for and that dont use windows api)
Lazarus also has built in MYSQL support too :slight_smile:

Have you ever tried lazarus on windoze?
Doing the download rigth now, keep you posted.

Are you all set forn MAndriva? will you keep it?
I am downloading the src for kernEl 2.6.17.13 now So I can test the usb stuff.

good news!
i have test program compiled with Lazarus with the libcom.so file and it works!
(in getting data from my Davis WMII), using code from Kylix
so, in theory, it should work on the MAC too?

re windows:
not yet: in theory I should be able to compile the program in windows and then cross link it to work under Linux (by setting widgets to use) (but no windows api can be used)?
(if you can get that to work, let me know how!)

Lazarus is installed on windows XP,
just have to reboot. and then give the path forr fpc src folder.

Ok, I have the windows version installed and have compiled and run a simple “hello world” program :slight_smile:
this is good stuff
i can do the work on my windows laptop then copy the files to the linux pc and compile the program there and the same thing on my soon to be MAC as well!

Do not tell me Lazarus is already better than Kylix :smiley:

just looking at all the documents on porting code etc

there is a fair bit of code that will not work the same (but alot that will too)

i think I will need to build a new project from the ground up
I will be able to use some of my existing code OK (e.g dealing with the actual data from the weather station)
here is my chance though to write the program differently too (from what I have learned over the years!)

The good thing is that now you are not anymore handcuffed with a proprietary software. I do not really know why Borland gave up with the version of Delphi for linux.

Actually you also have a version of Lazarus that runs on MAC old fashion I guess.

Good luck developping the missing stuff.

oh, I found its very easy to grab a image of the window screen form in Lazarus,using
var
SnapShotBitmap: TBitmap;
begin
SnapShotBitmap:=TBitmap.Create;
SnapShotBitmap.LoadFromDevice(Canvas.Handle);
SnapShotBitmap.SaveToFile(‘c:\snapshot.bmp’);
SnapShotBitmap.Free;

but, same problem as with Kylix , if another window is over the top, that is captures as well

i managed to get imported the instrument component package I use in the windows version
(I had to purchase the source code, 30 euro)
the graphing part of the component has ported well
but some of the instruments dont look good
thats because the components used alot of windows specific drawing routines, and I had to make work arounds or bracket out that code (took me hours to do all that)

i will try and find some work arounds!

i managed to get this package installed into the linux lazarus compiler too…but with some hiccups…namely reference to the registry…which caused an access violation when the compiler started…took me a while to undo things!

How is it going with Lazarus? Any good stuff other than the Mac Intel test prog?

unfortunately have had a few issues to deal with on the windows version and a run of people to help there too
I have been looking at converting more components…

i am hoping to dedicating as much as possible of this coming week to the project

I have the LCD numbers component converted and installed in Lazarus (needed some changes in the code)
so thats another component converted
still more to go
these things all take time!

maybe I can help, you just have to give a piece of source and the component and I can try to convert it into lazarus?

good idea :slight_smile:
I have sent you a email :slight_smile:

I have come across a few problems
the instrument components I have used use windows clipping
which is not working
so things like the windspeed dial and temperature dial do not look good (big square!)
I cant find a way around that problem

next problem is with the compiler: its making things disepear when i add a graph component…weird things like that

i could get around that by making the graphs a separate window

so, with those problems, and not all components able to be ported, I will have to use only bits and pieces and build up a new version

hummmm
its OK if i use the graphing component from fresh, and setup it up again from default

I think it will be easier if you were creating separate windows, one for the dials, and on or more for the graphs.
About the dial that are ugly did you search the internet?
I am doing a search for the moon phases, becuase the one you have is delphi and hard to convert to FPC.

yes, I have asked for help on the Linux forum
answer was its not fully supported yet in lazarus
I am “windy” on the lazarus forum :wink:
i do have some simple BASIC code i have used in the kylix version
that moon tool had alot of other good functions
(but hard code to follow!)