Log in

View Full Version : Start coding - use freepascal |Most OSs


Amnon82
29th January 2006, 19:19
http://www.lazarus.freepascal.org/themes/lazarus/images/lazarus_logo_small.jpg

Free Pascal
=============================================================

Overview

Free Pascal (aka FPK Pascal) is a 32 and 64 bit professional Pascal compiler. It is available for different processors: Intel x86, Amd64/x86 64, PowerPC, Sparc. The discontinued 1.0 version also supports the Motorola 680x0. The following operating systems are supported: Linux, FreeBSD, Mac OS X/Darwin, Mac OS classic, DOS, Win32, OS/2, Netware (libc and classic) and MorphOS.

Current Version

Version 2.0.2 is the latest stable version the Free Pascal. Hit the download link and select a mirror close to you to download your copy. The development releases have version numbers 2.1.x. See the development page how to obtain the latest sources and support development.
Features

The language syntax has excellent compatibility with TP 7.0 as well as with most versions of Delphi (classes, rtti, exceptions, ansistrings, widestrings, interfaces). A Mac Pascal compatibility mode is also provided to assist Apple users. Furthermore Free Pascal supports function overloading, operator overloading, global properties and other such features.
Requirements
x86 architecture:

For the 80x86 version at least a 386 processor is required, but a 486 is recommended.

PowerPC architecture:

Any PowerPC processor will do. 16 MB of RAM is required. The Mac OS classic version is expected to work System 7.5.3 and later. The Mac OS X version requires Mac OS X 10.1 or later, with the developer tools installed. On other operating systems Free Pascal runs on any system that can run the operating system.

ARM architecture

Only cross-compiling to ARM is supported at this time.

Sparc architecture

16 MB of RAM is required. Runs on any Sparc Linux installation.

License

The packages and runtime library come under a modified Library GNU Public License to allow the use of static libraries when creating applications. The compiler source itself comes under the GNU General Public License. The sources for both the compiler and runtime library are available; the complete compiler is written in Pascal.

=============================================================

Lazarus - THE IDE

http://img475.imageshack.us/img475/6921/lazarus6ce.th.png (http://img475.imageshack.us/my.php?image=lazarus6ce.png)

So just what is Lazarus?

Lazarus is the class libraries for Free Pascal that emulate Delphi. Free Pascal is a GPL'ed compiler that runs on Linux, Win32, OS/2, 68K and more. Free Pascal is designed to be able to understand and compile Delphi syntax, which is of course OOP. Lazarus is the part of the missing puzzle that will allow you to develop Delphi like programs in all of the above platforms. Unlike Java which strives to be a write once run anywhere, Lazarus and Free Pascal strives for write once compile anywhere. Since the exact same compiler is available on all of the above platforms it means you don't need to do any recoding to produce identical products for different platforms.
Yeah, but what about the GUI? What widget set are you using?

That is the neat part. You decide. Lazarus is being developed to be totally and completely API independent. Once you write your code you just link it against the API widget set of your choice. If you want to use GTK+, great! If you want it to be Gnome compliant, great! As long as the interface code for the widget set you want to use is available you can link to it. If it isn't available, well you can write it.

For example. Let's say you are creating a product on Windows using the standard Windows widgets. Now you want to create a Linux version. First you decide what widget set you want to use. Let's assume you want to use gtk+. So you copy the code over to your Linux development machine, compile, and link against the gtk+ interface unit. That's it. You've now just created a Linux version of the Windows product without any additional coding.

At this point in the development we are using gtk+ as our initial API widget set. Some work is also being done with Qt and the Win32 API. As soon as Lazarus reaches a 1.0 release developers will be able to start to create the interface unit to tie the LCL (Lazarus Component Libraries) to other widget sets.
So is this thing really RAD like Delphi?

It sure is. Is it totally completed? No not yet. The forms design portion is still in need of a great deal of development. The over all IDE is complete and can be used for most programming needs. Several aspects of the project are still in need of help. Hint. Hint.
Can I use my existing Delphi code?

Some of it yes. If the code is standard Delphi pascal and it uses the standard components found in Delphi then the answer is yes. If it uses some specific database, OCX, or DCU then the answer would be no. These items are specific to Windows and would only work on and within Windows. However, if you are only looking to create a Windows product using Free Pascal and Lazarus then the answer would be yes. This hasn't been added to the LCL yet but it should be possible in the future.
Can I create commercial products with this?

Yes. The code for the Free Pascal compiler is licensed under the GPL. This means that it is open source, free, whatever name you want to stick to it. You can modify the code if you wish but you MUST distribute those changes or make them available to others if they wish to use it.

The FCL (Free Pascal Component Libraries) and the LCL (which will eventually become part of the FCL) are licensed under a modified LGPL. In a nut shell this means that you can write your own proprietary software that just links to these libraries. You can sell your application without the need to supply or make available your code. However, as with the compiler if you make modifications to the FCL or LCL you must make those changes available to the general public and the world.
I give up, where did the name come from?

One of the original projects that made an attempt to build a Delphi clone was Megido. However this effort died. Lazarus as you know was the biblical figure that was raised from the dead by Christ. Soooooo. The project is named Lazarus as it was started/raised from the death of Megido.

=============================================================

FreePascal 2.0.2a (Win32) (http://prdownloads.sourceforge.net/lazarus/fpc-2.0.2a.i386-win32.exe)
Lazarus-0.9.10 IDE (Win32) (http://prdownloads.sourceforge.net/lazarus/Lazarus-0.9.10-20051002-win32.exe)