Difference between revisions of "Installing Lazarus/fr"
|Line 45:||Line 45:|
: 'RPMs (alien) stable fpc (2.0.2 ) Lazarus source.<br>
:* rpm -Uvh fpc-2.0.2-0.i386.rpm
:* rpm -Uvh fpc-2.0.2-0.i386.rpm
:* rpm -Uvh fpcsrc-2.0.2-0.i386.rpm
:* rpm -Uvh fpcsrc-2.0.2-0.i386.rpm
:* rpm -Uvh lazarus-0.9.14-1.i386.rpm<br>
:* rpm -Uvh lazarus-0.9.14-1.i386.rpm<br>
Debian alien (, fpc.cfg) tarball install.
==== FPC Sources ====
==== FPC Sources ====
version 2.0, FPC Subversion (SVN). CVS, SVN FPC.
===== Development Tree (version 2.1.x) =====
(v 2.1.x) SVN source repository: , source repository. site SVN.
v2.1.x : [ftp://ftp.freepascal.org/pub/fpc/snapshot/v21/source/fpc.zip fpc.zip] (24 MB)
===== Release Tree (version 2.0.x) =====
(v 2.0.x) stable SVN source repository: , source repository. site SVN.
v2.0.x: [ftp://ftp.freepascal.org/pub/fpc/snapshot/v20/source/fpc.zip fpc.zip] (24 MB)
Revision as of 07:54, 17 August 2006
Traduction en cours
Deutsch (de) │
English (en) │
español (es) │
suomi (fi) │
français (fr) │
magyar (hu) │
日本語 (ja) │
한국어 (ko) │
polski (pl) │
português (pt) │
русский (ru) │
slovenčina (sk) │
Tiếng Việt (vi) │
中文（中国大陆） (zh_CN) │
- 1 Généralités
- 2 Installer le Compilateur Free Pascal
- 2.1 Installer Free Pascal sous Linux
- 2.1.1 FPC Binaries
- 2.1.2 FPC Sources
- 18.104.22.168 Télécharger les instantanés journaliers du Development Tree (version 2.1.x)
- 22.214.171.124 Télécharger les instantanés journaliers du Release Tree (version 2.0.x)
- 126.96.36.199 Connect to Source Repository with SVN (replaces section on connection to CVS)
- 188.8.131.52 Development snapshots
- 184.108.40.206 Fixes to 2.0.x
- 2.2 Installing Free Pascal under Windows
- 2.3 Installing Free Pascal under FreeBSD/auto
- 2.4 Installing Free Pascal under BSD/manually
- 2.5 Installing Free Pascal under Mac OS X
- 2.1 Installer Free Pascal sous Linux
- 3 Installing Lazarus
- 3.1 Installing Lazarus under Linux
- 3.2 Installing Lazarus under Mac OS X
- 3.3 Installing Lazarus under Windows
- 3.4 Additional experiences and advice on installing FPC and Lazarus
- 3.5 Installing Lazarus under BSD
- 4 Original contributors and changes
Pour ceux qui veulent seulement installer Lazarus et l'utiliser pour programmer, la meilleure solution est de télécharger et d'installer une version binaire, récente et stable (pour Linux un packet '.rpm', ou un exécutable d'installation pour Windows '.exe' ou encore un packet '.dmg' pour Mac OS X). Vous pouvez lire les sections relatives à Linux ou Windows intitulées 'fpc binaries', ou les premiers paragraphes des sections qui traitnet de l'installation de Lazarus sous Linux or Windows; La plupart des autres informations peuvent être ignorées sans risque.
Pour ceux qui veulent participer au développement du compilateur ou de l'IDE, ou ceux qui veulent les outils les plus récents, une installation à partir des fichiers source est nécessaire, et la plupart des informations de ce document sont importantes.
Lazarus a deux composantes :
- LCL - la bibliothèque de composants ( Lazarus Component Library )
- IDE - l'interface de développement (RAD tool)
Les deux utilisent :
- FPC - le compilateur FreePascal
- FCL -la bibliothèque de composants de FreePascal, qui contient l'essentiel des composants ou objets non visuels utilisés par Lazarus.
Ce dont a besoin Lazarus pour fonctionner :
- Le compilateur FreePascal, ses packets et ses sources. (*important*: ils doivent être de la même version et date)
- Des interfaces adaptés :
- L'API Win32 peut être utilisée
- GTK+ 1.2.x : La plupart des distributions Linus et *BSDs installent la bibliothèque GTK+ 1.2.x. Vous pouvez aussi les trouver à : http://www.gtk.org.
Si vous voulez la gdk-pixbuf, 0.13 ou plus récente (de préférence 0.18 oou plus), elle est également incluse dans les distributions les plus récentes depuis 2 ans. Le code source est disponible à : ftp://ftp.gnome.org/pub/GNOME/sources/gdk-pixbuf/
- Mac OS X
- GTK+ 1.2.x : Vous avez besoin de l'Apple developer tools, X11, et GTK1.2. Voir l'installation pour Mac OS X plus loin.
- GTK+ 2.x
- Attention : l' interface GTK2 n'est pas encore terminé et ne doit être utilisé qu'à des fins de test.Il est dans les distributions les plus récentes. Pour le code source voir : http://www.gtk.org.
La FAQ – Le fichier de la Foir Aux Questions est sur : http://www.lazarus.freepascal.org . Cerrtaines questions sont dans le fichier local : 'FAQ'.
Les paragraphes suivants décrivent comment se procurer FreePascal et comment installer Lazarus correctement.
Installer le Compilateur Free Pascal
L'installation et la construction du compilateur Free Pascal fait l'objet d'une discussion très ouverte sur http://www.stack.nl/~marcov/buildfaq.pdf – C'est peut être un peu trop détaillé pour certains utilisateurs, mais cela reste toujours très compréhensible.
Lazarus a besoin de fpc (FreePascal) version 2.0.2 ou plus, ainsi que des bibliothèques compilées fpc libs (binaires) et des code source fpc, le tout dans les mêmes versions.
Installer Free Pascal sous Linux
La dernière version de FreePascal, actuellement la version 2.0.2, peut être téléchargée sur le site de FreePascal (http://www.freepascal.org/download.html, puis choisir un miroir) ou a partir de sourceforge (http://sourceforge.net/projects/lazarus).
A la partie téléchargement de lazarus (http://www.lazarus.freepascal.org ) vous avez les RPM du compilateur Free Pascal (compiler / linux) ainsi que ses 'packages'. Si vous n'avez pas une distribution basée sur les RPM, vous pouvez télécharger et installer les 'tarballs' (je ne connais rien en Linux désolé) à partir de http://www.freepascal.org. Si vous souhaitez compiler votre version vous même, consultez la section BSD.
ATTENTION: Si vous n'utilisez pas les RPMs (même si vous prévoyez d'utiliser alien) le mieux est de télécharger la denière version stable fpc (2.0.2 actuellement) et d'installer Lazarus à partir du code source.
Démarrer Linux et se logger sous ROOT.
Télécharger les derniers fichers à : http://sourceforge.net/project/showfiles.php?group_id=89339. Par exemple :
et les installer avec :
- rpm -Uvh fpc-2.0.2-0.i386.rpm
- rpm -Uvh fpcsrc-2.0.2-0.i386.rpm
- rpm -Uvh lazarus-0.9.14-1.i386.rpm
Les utilisateurs de Debian doivent ressortir leur alien (attention, il ne génére pas fpc.cfg) ou les tarball install.
Depuis la sortie de la version 2.0, FPC a migré vers Subversion (SVN). Actuellement il n'y a pas de mirroir pour les CVS, vous devez donc utiliser SVN pour récupérer les sources FPC.
Télécharger les instantanés journaliers du Development Tree (version 2.1.x)
Vous pouvez télécharger les évolutions journalières des codes sources (v 2.1.x) sous forme d'un packet instantané à partir du SVN source repository: ces instantanés sont mis à jour chaque jour, et sont le reflet du source repository. Les fichiers sont conservés sur le site des archives SVN. La totalité des archives publiques de v2.1.x : fpc.zip (24 MB)
Télécharger les instantanés journaliers du Release Tree (version 2.0.x)
Vous pouvez télécharger journellement les codes sources (v 2.0.x) qui vont intégrer la prochaine release stable sous forme d'un packet instantané à partir du SVN source repository: ces instantanés sont mis à jour chaque jour, et sont le reflet du source repository. Les fichiers sont conservés sur le site des archives SVN. La totalité des archives publiques de v2.0.x: fpc.zip (24 MB)
Connect to Source Repository with SVN (replaces section on connection to CVS)
As an alternative to the daily zip files of the SVN sources, the SVN repository has been made accessible for everyone, with read-only access. This means that you can directly access the code, and you will have really the last-minute sources available. It is also a method which requires less bandwidth once you have done the first download (checkout in SVN lingo).
How to do this? (You need to have SVN installed, of course. Look here for instructions on how to do that.)
Change Directory (cd) to the parent directory of your development area, eg
$ cd /home/username/FreePascal
To retrieve the full source repository, all publicly available modules, type
$ svn checkout http://svn.freepascal.org/svn/fpc/trunk fpc
Normally, you should perform this step just once.
To update the sources which were downloaded (checkout) above
$svn update fpc
Fixes to 2.0.x
The fixes need a separate directory, create a separate directory 'fixes', enter it, and repeat the above checkout command with the URL http://svn.freepascal.org/svn/fpc/branches/fixes_2_0:
$ cd mysvn/fixes $ svn checkout http://svn.freepascal.org/svn/fpc/branches/fixes_2_0 fpc
and to update:
$ svn update fpc
The sources of docs are in a separate repository called fpcdocs, so the command to get them is
$ svn checkout http://svn.freepascal.org/svn/fpcdocs/trunk fpcdocs
If you want to learn more about subversion, read this excellent Subversion book which is also available online in different formats for free.
For the curious: You have only read-only access, so don't try to commit anything :-)
For more information, see the FreePascal website
Installing Free Pascal under Windows
FPC Binaries for Windows
By far the easiest way to get a working installation of Free Pascal is to download the current binary Windows release of Lazarus from the SourceForge repository - the release contains the current versions of the FreePascal compiler and the FreePascal libraries as well as the lazarus IDE. If you want to install from sources, read on!
You can get the installer zip for fpc 2.0.2 at Free Pascal's download section http://www.freepascal.org/download.html, then choose a mirror). Installing from the sources -- see the next section to know how to get them -- is not for novices, since you need a starting compiler as well.
FPC Sources for Windows
<<<< See section above under FPC Sources for Linux, where the use of SVN is described >>>>
The easiest way to get the Free Pascal sources is via SVN; see the next section for more on that. You can also download the package as a whole -- see http://www.freepascal.org/develop.html for the daily snapshot of the 2.1.x release tree.
Windows FPC Sources via SVN ()
You will need to have a SVN client such as TortoiseSVN installed in order to perform the steps below. The exact commands vary between SVN clients; the ones given below are to be used under SVN home's client, which is available for download here.
First create a directory in which you'd like to put the sources. Any normal user can do this. Create a directory for fpc (e.g. C:\Source), then do the following at the command prompt:
C:\Source> svn co http://svn.freepascal.org/svn/svn/trunk fpc
Hint: To download/update the latest changes you can simply do
C:\> cd Source\FPC C:\Source\FPC> svn up
ToDo: Write me.
Extending your PATH variable to the fpc directory:
- Win98: Edit autoexec.bat and add the line: PATH=%PATH%;C:\pp\bin\bin\win32
- WinXP/2k: My Computer (Right Click) -> Properties -> Advanced (Page) -> Enviroment Variables -> System Variables -> Edit "PATH", Add "C:\pp\bin\bin\win32" there.
Then restart windows.
ToDo: Explain how to download fpc sources and build the compiler
Installing Free Pascal under FreeBSD/auto
Latest FreeBSD ports collection has 2.0.2 (and soon 2.0.4) stable version in ports/lang/fpc2. All you have to do is install the port. If you want to use Lazarus you need to install "gtk" from ports first tho.
This can be done manualy as root.
# cd /usr/ports/lang/fpc2 && make install && make clean
Other possibility is to use portinstall.
# portinstall fpc2
Once fpc is installed you can check if it's working by simply running
There's one problem with FreeBSD and FPC however. The port installs all packages and FCL, but the latest glib and gtk from ports tree (which is required for Lazarus) has been renamed. This means that you'll get a "cannot find library -lglib" when linking Lazarus. You can fix this in one of two ways.
1. You can change the names in fpc sources and recompile [not recommended]
2. You can soft-link the new glib/gtk libnames to old ones.
2. can be done like this:
$ cd /usr/local/lib && ln -s libglib-12.so libglib12.so $ cd /usr/X11R6/lib && ln -s libgtk-12.so libgtk12.so
Lazarus should compile and link after these changes.
Installing Free Pascal under BSD/manually
Effectively, you need
A file with all sources, or two (fpc and lazarus)
1. e.g. for fpc ftp://ftp.freepascal.org/fpc/dist/Linux/separate/sources.tar preferably an export (no CVS/ dirs). The above file misses this. 2. Lazarus source snapshot.
- _any_ starting compiler from the 2.0.2 branch) You can do a check by parsing the output of ppc386 -i if it is 2.0.2 .. 2.1.x it is ok.
- - dependant packages. (for FreeBSD that is gtk12, glib12 and gdk_pixbuf and GNU make, iconv and gettext)
1. (fetch) necessary files (FPC source, starting compiler) 2. (extract) Then de-tgz in work directory, 3. (build) enter work/fpc/ and run
$MAKE all OPT='-gl -O3p3' PP=/path/to/startingcompiler-name-ppc386 (/path/to/ can be omitted when ppc386 is in the path) ($MAKE is make on linux and gmake on BSD)
4. (install) then, again in work/fpc, run
$MAKE install PP=compiler/ppc386 PREFIX=$THEPREFIX (THEPREFIX= usually is /usr/lcoal, but e.g. on NetBSD it is /usr/pkg for ports) Create a symlink: ln -s $THEPREFIX/lib/fpc/2.0.2/ppc386 $THEPREFIX/bin/ppc386 install sourceinstall PREFIX=$THEPREFIX
5. (configure) run compiler/utils/samplecfg $THEPREFIX/lib/fpc/2.0.1 $ETCDIR 6. (optional, test), see if ppc386 -i gives output, else give a warning that user need to add $PREFIX/bin to his current path. Try to compiler a program with -viwn, and see if that gives errors. Notes:
- If you need fpcmake package lists, you need to generate or supply them yourself, (in the port, or in an extra archive) either way, do a dummy install to /tmp/pack and determine the files installed with find . >ll
- $THEPREFIX and $ETCDIR should be user configurable. Otherwise local installs aren't possible.
- BSDHIER=1 on all make commands forces BSD hierarchy conventions.
Installing Free Pascal under Mac OS X
You also need the Apple Developer tools, X11, and GTK 1.2:
Developer-tools: Are included on the original OSX installation CDs, or download at ADC (free registration required):
Apple X11: On a new system: choose "Customize" in the install dialog, check "X11".
On an already installed system:
MacOSX 10.3: download at:
MacOSX 10.4: install X11 from the DVD.
GTK 1.2: Downloading the GTK packages and installing them properly can be a time consuming task. Therefore there are various package managers. One of them is fink:
- Download fink from http://fink.sourceforge.net/download/index.php?phpLang=en; follow the install instructions.
In the Terminal, run
sudo /sw/bin/apt-get install gdk-pixbuf gtk+ gtk+-data gtk+-shlibs gtk-doc gtk-engines
The X11 application is in /Applications/Utilities/X11. You can drag and drop it on the dock so you can start it with one click.
Tip: Most X11 programs, including Lazarus, expect to receive focus when the user clicks on a window. Under MacOSX this is deactivated. You can activate it for all X11 applications by typing in the terminal:
defaults write com.apple.x11 wm_click_through -bool true
- Free Pascal Compiler
Then download and install the Free Pascal Compiler (at least 2.0.2) from:
When compiling GTK-related software, you need to add two lines to the fpc.cfg file, to enable use of libraries:
For Lazarus you need the FPC sources as well:
- Install SVN for MacOS X: A good package is provided by Martin Ott.
Create a directory, where you would like to put the sources. You don't need to be root to do this. Any normal user can do this. First create a directory for fpc
- (e.g. /Users/username/freepascal)
then open a terminal and do the following:
$ svn co http://svn.freepascal.org/svn/svn/trunk fpc
This will create a directories called 'fpc', which can be later used in the IDE. Hint: To download/update the latest changes you can simply do
$ cd /Users/username/freepascal/fpc $ svn up
Installing Lazarus under Linux
Installing using rpms
The easiest way to get a current working installation of Lazarus is to download the RPMs for FreePascal and Lazarus from the SourceForge repository.
You need to download the selected version of
- the compiler (eg fpc-1.9.5-041207.i386.rpm)
- the pascal source library (eg fpcsrc-1.9.5-041207.i386.rpm)
- the Lazarus package (eg lazarus-0.9.2.4-fpc_1.9.5_041207.i386.rpm).
You then issue the following commands (you need to have root privileges - use su or sudo)
rpm -Uvh fpc-1.9.5-041207.i386.rpm rpm -Uvh fpcsrc-1.9.5-041207.i386.rpm rpm -Uvh lazarus-0.9.2.4-fpc_1.9.5_041207.i386.rpm
Installing Lazarus 0.9.16. For Suse 10.1 users:
Start Linux and login as "Root"
Free Pascal Compiler requires:
- Gnu binutils (gnu as, gnu ld, gnu make) - check it out with "YAST"
Download these binary files (RPM)
- fpc-2.0.2-0.i586.rpm (yes i586 and not i386)
install them opening a terminal session (mouse's rigth button -> Menu: Open in terminal)
- rpm -Uvh fpc-2.0.2-0.i586.rpm
- rpm -Uvh fpcsrc-2.0.2-0.i386.rpm
Lazarus requires these components:
1) glib devel
2) gtk devel
The last component seems does not work with Suse, then once we have installed the first three components we can force installation with -nodeps option:
- rpm -Uvh --nodeps lazarus-0.9.16-1.i386.rpm
Installing from source
If you prefer to install from source and compile the files yourself, follow these instructions. Because the whole lazarus stuff is installed into one directory, uninstall is very easy and you don't need to be root to install lazarus. You can get tgz files for fpc, fpcsrc and lazarus from the downloads section or you can download it directly via svn.
Downloading Lazarus SVN
The lazarus repository has moved from cvs to svn (Subversion). SVN provides an easy way to update your sources by only downloading the changes. This is the recommended way and saves you a lot of time. A connection to the internet is needed for this: you don't need to be root. Lazarus does not need any special permissions, neither during installation nor at runtime.
With the move we also changed the directory layout of the lazarus sources. The main difference is that all ide sources are moved from the root to a separate ide subdir. As anybody might understand, this has an impact on the Makefiles, the searchpaths etc. We are in progress of fixing things, so if something doesn't work, please let us know.
- Now the most important thing.... getting the sources
$ svn checkout http://svn.freepascal.org/svn/lazarus/trunk/ lazarus
(or any other dir where you want to place your sources)
On subsequent occasions, to update simply type
$ svn update lazarus
For more information on Subversion, see: http://subversion.tigris.org/
Note: the CVS is still accessable, but it frozen. This means that no new updates are comitted.
Compiling and running
Whether you checkout from cvs or svn, the next step is:
- compile lazarus
$ cd lazarus $ make (gmake on BSD)
If fpc is installed correctly, the compilation should work without problems. If not, see FAQ.
- Start lazarus
The IDE should start. If you started lazarus in a terminal, you can see some notes about missing settings. This is normal at first start. The IDE automatically tries to find out where the freepascal compiler and its sources are installed by searching in the most common directories.
- Check the paths
- Use the IDE menu to go to
- Environment -> Environment Options -> Files
The 'FPC Source directory' should point to your fpc source directory. This directory normally ends with /fpc/ or /fpcsrc/ (e.g. /usr/src/fpcsrc or /home/username/freepascal/fpc) and contains directories like 'compiler', 'docs', 'fcl', 'rtl' and 'packages'.
ToDo: explain the other paths
To update lazarus you can use
$ svn update lazarus
then for either update pathway:
$ make clean all (gmake on BSD)
This will rebuild lazarus and create an IDE without lazarus packages. To link your installed packages do after the above:
$ make idepkg
Installing Lazarus under Debian GNU/Linux
There are preliminary Debian packages for lazarus available for download. They are not the latest versions, however. Make sure you read /usr/share/doc/lazarus/README.Debian carefully before you start using it. Feedback is needed and appreciated; please send your comments to Carlos Laviola <firstname.lastname@example.org>.
Note that for a fully working Lazarus install, no older or incompatible versions of, for example, the fpc source or fpc compiler must be installed. Remove them by typing
dpkg -r <package name>
without .deb extension. And then install the newest versions as described.
Another way to install Lazarus under Debian
Added by User:Kirkpatc.
- Simple Lazarus Installation in Debian
(assume new Debian installation, without development libraries loaded)
From sourceforge repository, download latest fpc, fpclib and lazarus releases; follow links from http://lazarus.freepascal.org, click the "downloads" button on the left, then click on "binaries" then "linux" then "Current Lazarus RPM". This will bring you to
then download the following files (or more recent, if available)
cd to the directory where these files are stored, then become root (su) and type:
alien -c fpc* //this will convert both the fpc and fpcsrc files to debian format and convert the install scripts alien -c laz*
then install the generated Debian (.deb) packages by (as root):
dpkg -i fpc*.deb laz*.deb
or use kpackage or a similar utility to install the generated fpc, fpcsrc and lazarus .deb files.
And if you do not have alien type:
apt-get install alien
Please note that, on Linux distributions like Ubuntu, you'll have to add 'sudo' in front of all commands. In Ubuntu previous command would be
sudo apt-get install alien
You need to produce a configuration file, which will reside in /etc/fpc.cfg. Still as root, cd to the main fpc directory /usr/lib/fpc/2.0.0 and then type
sh ./samplecfg /usr/lib/fpc/2.0.0 /etc
Check the contents of your new configuration file (cat /etc/fpc.cfg) and make any changes you want using vi or another text editor. Also make sure that there are no old configuration files in for example your home directory (~/.fpc.cfg).
You need to install the development packages of the GTK and pixbuf libraries, so
apt-get install libgtk2.0-dev apt-get install libgdk-pixbuf-dev
Then you should be ready to start programming!
Installing Lazarus under Mac OS X
Works pretty much the same as under Linux. But you first need to install the Apple developer tools, X11, and GTK 1.2.
Easy-to-install snapshots are also available at http://www.de.freepascal.org/lazarus/.
If you install all 3 .dmg snapshot files, this also installs the FPC compiler and the FPC and Lazarus source too. If you only need to run Lazarus to develop and compile your own apps, you don't need to install the FPC and Lazarus sources as described above. If you need to rebuild Lazarus or want to help with its development, then you should to install the Lazarus source to a folder where you have read-write permission, as described above.
If you want to experiment and develop the Carbon widgetset interface, look at Carbon Interface.
There are at least two ways to start Lazarus under OS X:
Start X11. In the terminal window, type:
cd /usr/local/share/lazarus ./lazarus
You can also run Lazarus from the X11 menu. Choose Applications | Customize, click Add Item, then under Name enter Lazarus and under Command enter:
open -a /usr/local/share/lazarus/lazarus
Click Done. Now you can start Lazarus by choosing Applications | Lazarus.
Installing Lazarus under Windows
The current releases of the Windows Lazarus binary packages install very easily, and should work 'out-of-the-box'.
It is even possible to install the whole Lazarus/FPC package on a portable USB drive (capacity at least 256 MB), for use in environments where you are not allowed to install software on your Windows workstation or where you haven't got administrator privileges. You do have to be a little careful about adjusting the paths in the compiler and environment options and the fpc.cfg file. It may also be necessary to keep the directory for test compilation on your portable drive. << DOES ANYONE KNOW HOW TO SET UP RELATIVE PATHS IN THESE TAGS AND FILES, SO THAT THE ADDRESSING WORKS WHEN YOU MOVE THE USB DEVICE TO ANOTHER MACHINE WHERE IT HAS A DIFFERENT DRIVE LETTER? >>
The binary package is available for Linux and Windows from
Download the latest release (currently Lazarus-0.9.15-20060415-win32.exe) and launch the application. You will be taken through a typical Windows installation, in which the FPC compiler and source libraries are installed within the same directory structure as Lazarus, and the IDE should launch and operate without significant problems, provided you have uninstalled any previous version of Lazarus and/or FPC (often found in the C:\pp directory).
You can also get a Lazarus Snapshot for Windows at: http://www.de.freepascal.org/lazarus/
Installing from source
If you prefer to install from sources, then follow these instructions (Thanks to Joe for the initial Step-by-step description)
You have to download the lazarus source:
Then unzip it to c:\lazarus for example. You have to install at least fpc-2.0.2, but a fpc-2.0.3 or fpc 2.1.1 snapshot is also possible. It compiles for me, and lazarus.exe works. The path to my fpc is: c:\pp\bin\win32. In this directory you can find a lot of exe (make, grep, ppc386, and so on).
Open a command line. Start->Run...>command or choose MS-DOS icon.
cd c:\lazarus set path=c:\pp\bin\win32;c:\lazarus //of course change the first to //the path of yours windres -i lazarus.rc -o lazarus.res make
If you are lucky then you can type: lazarus.exe. The source editor, dialogs and the property editor work, but not perfectly... Look and you will see.
You can compile examples also:
cd examples make
If you extracted lazarus to another drive, eg.: d:\lazarus. It can happen that you need the gnu utility to make it. If you have it, you can take its path to set path=...;<gmakepath> but it is simpler not to choose drive d:\
Additional experiences and advice on installing FPC and Lazarus
On linux, getting Lazarus to work can be complicated. If you have already installed earlier versions of FPC and/or Lazarus, you have to take great care that the PATHS are adjusted so that only your new versions are called.
Pitfalls that I have experienced in various attempts with SuSE linux include:
The rpm versions often install FPC in /bin or /usr/bin, with the libraries in /lib or /usr/lib.
If you perform a make install on a source version or use a .tar.gz, the compiler is usually installed in /usr/local/bin with the libraries in /usr/local/lib.
So if earlier versions have been installed from rpm, make sure all links are changed to reflect the directory structure of your new compiler. The place to make the changes is in /etc/fpc.cfg ; make sure there are no remnant configuration files in your home directory or in your FPC download directory. Typically they are found in ~/.fpc.cfg
Make sure the links in /etc/fpc.cfg point to the correct versions of the libraries (particularly if you have older versions still lurking around).
In /usr/local/bin or /usr/bin there is a file called fpc ; this is the executable that is called when you invoke the compiler. One of the first things it does is to open ppc386 in the same directory. This has to be the same version as the fpc file, or can be a link pointing to the true ppc386 in some other directory (such as a library directory, or the fpc directory in your own development space); be sure to update your link if you install a newer version of the compiler.
Try running the compiler from the command line using one of the simple example programs or one which you wrote yourself.
Turning to Lazarus:
If you use a downloaded snapshot (.tar.gz) or get the source from CVS, enter your lazarus directory and type
and hopefully the IDE should load. There may be a message saying it can't find the sources; if so, go to the menu at the top and select Environment -> Environment options and insert the name of the directory where you expect to find your lazarus files (eg ~/FreePascal/lazarus), your compiler (eg /usr/local/bin/ppc386), the FreePascal source directory (eg /usr/local/lib/fpc/$version/fpc or a directory in your own space eg ~/FreePascal/fpc). Then close the dialog and start programming.
You may find further problems when you start programming or compiling; most of these will be related to PATH selection.
Many of the difficulties are dealt with in the Lazarus FAQ, found either on this WiKi site, or a more complete list on the main Lazarus site
From the top menu select Run -> Compiler Options (or Project -> Compiler Options in more recent releases of Lazarus) and select the Paths tab on the resulting dialog. There are several boxes for entry of paths for Unit files, Include files, Other source files, Libraries etc. For each of these, it is worth pressing the ... (ellipsis) button on the right, and you will be given a blank window for inserting path information, and a lower window giving some suggestions. Select as many as you like (or ALL!) and press the ADD button to transfer the selections to the upper window. When your selection is complete, press OK and move on to the next box. If you know of other paths which need to be followed, press the Browse button associated with each box, and insert the additional paths.
When you think you have got your paths right, try to compile your application. If there are further path-related errors ('can't find unit .......') then go back and check your paths, both in /etc/fpc.cfg and in your Run -> Compiler Options dialog (or Project -> Compiler Options depending on your version).
Once you have got the environment and PATHS correct, it is worth saving the settings to a file, otherwise you will have to go through this process for each new project. In the Run -> Compiler options dialog there is a Load/Save button; select this and then save the setings to the filename of your choice: mine is ~/FreePascal/default.cfg. Then each time I start a new project, I can go to the Run -> Compiler Options dialog (or Project -> Compiler Options), select Load/Save, and load my default.cfg file to the new project. You can, of course, modify the options for each new project if you so desire.
Installing Lazarus under BSD
As the text above says, you must have GTK+ 1.2 installed. I did not, so I installed that first as root:
> pkg_add -r gtk > pkg_add -r gdk-pixbuf > cd /path-to-lazarus > gmake > ./startlazarus
If you get the messages about missing source files, go to [menu bar >> Environment >> Environment Options >> Files Tab: FPC source library] and enter the directory of the FPC source files. I got them from SVN as described above.
Good luck, that worked for me. --Jrmarino 21:29, 4 Jan 2006 (CET)
This works on 6.0 too. There were 2 potential problems tho.
1. After start, lazarus source editor seemed to have some broken font. This is due to missing courier. Fix is simple, go to editor options and chose another font (clean works for me).
2. Unlike on Linux you MUST specify path to GMAKE (not make) in environment options if you wish to use packages and lazarus self-build features.
You can install Lazarus on PB-BSD by simply downloading the Lazarus PBI from PBI Dir
Note that you must install glib* port from /usr/port/devel/glib* or glib packages by pkg_add -r glib12 glib20. I will fix this in new PBI releases.
[other OpenBSD/NetBSD/DragonFlyBSD goes here]
Original contributors and changes
This page has been converted from the epikwiki version.
- Initially imported and formatted. VlxAdmin 9/22/2003
- Changed Joe's part for Windows to require fpc 1.0.10. Vincent 9/25/2003
- Updated "What is required for lazarus". AndrewJohnson 10/1/2003
- Finished formatted the InstallingLazarus page VlxAdmin 2/22/2004
- Posted some notes about Installing FPC and Lazarus: mostly reflecting experiences in trying to get the PATHS right in Linux. 3/11/2004 User:Kirkpatc
- Copied the contents of my note into the main InstallingLazarus section, edited it slightly. I don't know how to remove the original note. 3/12/2004 User:Kirkpatc
- Removed the original note. Tidied the wiki and formatting a bit. VlxAdmin
- Corrected a couple of typos - 3/12/2004 User:Kirkpatc
- Added link for daily snapshot deb packages - 3/27/2004 Vincent
- Fixed links in GettingLazarus (downloading binaries) and several other pages. 22 July 2004 User:Kirkpatc
- Added link for lazarus deb packages - 19 August 2004 VincentSnijders
- Added a short note on installing in Debian - 23 Nov 2004 User:Kirkpatc
- Considerable re-write and re-organization of installation section - 11 Dec 2004 User:Kirkpatc
- Fixed broken link - 9 Oct 2005 User:Avantman42