Sign in Join
Wiki copytemporary

Building the CLX with FPC: what changed

Revision 2 to 3. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
11## Introduction
22
33There are some efforts to build the (Free)CLX with FPC, here is a short explanation how to build it. For Win32 the Delphi 7 CLX is used while on linux the Kylix 3 CLX is used.
44
55Further, FPC from svn (2.3.1 or 2.2.1) is used.
66
77## Status
88
99Current status is that all units except the database related units build.
1010
1111That's 39 of 44 units.
1212
1313Today (02.07.2007) I get perfectly compiled Qxxx units and test application (written with Kylix). fpc-2.0.4 (i386 rpm from lazarus snapshots build 20070701), fpc-2.1.5 (build 20070702) cannot do the job.
1414
1515## Howto
1616
1717- Build and install FPC from SVN sources: [[How to start]]
1818- copy the clx sources to a newly created directory as well as the
1919 - Win32 only: CommDlg.pas from Source/Rtl/Win/
2020 - Win32 only: CommCtrl.pas from Source/Rtl/Win/
2121 - Win32 only: ShlObj.pas from Source/Rtl/Win/
2222 - Win32 only: RegStr.pas from Source/Rtl/Win/
2323 - Win32 only: WinInet.pas from Source/Rtl/Win/
2424 - Win32 only: UrlMon.pas from Source/Rtl/Win/
2525 - Win32 only: WinSpool.pas from Source/Rtl/Win/
2626 - Linux only: XLib.pas from source/rtl/linux/
2727 - MaskUtils.pas from Source/Rtl/Common/
2828 - Contnrs.pas from Source/Rtl/Common/
2929 - HelpIntfs.pas from Sources/Common/
3030 - IniFiles.pas from Source/Rtl/Common/
3131 - Registry.pas from Source/Rtl/Common/
3232 - Linux only: QFileCtrls.res from Lib/ ~~and rename it to qfilectrls.res~~
3333 - ~~Linux only: rename DirSel.xfm to dirsel.xfm~~
3434 - QButtons.res from Lib/
3535 - QDialogs.res from Lib/
3636 - QDBCtrls.res from Lib/
3737 - QCheckLst.res from Lib/
3838 - QFileCtrls.res from Lib/
3939 - ~~Linux only: rename QFileDialog.res to qfiledialog.res~~
4040 - ~~Linux only: rename QDialogs.res to qdialogs.res~~
4141 - ~~Linux only: rename QDBPWDlg.xfm to qdbpwdlg.xfm~~
4242 - ~~Linux only: rename QDBLogDlg.xfm to qdblogdlg.xfm~~
4343- ~~remove all references to *.xfm files, fpc can't handled them yet (fix this!!)~~
4444- D7 CLX only: remove usage of sysinit namespace in qdialogs.pas; system can be used instead
4545- ~~replace all RTLConsts with RTLConst (fix this!!) (should be fixed after 1.9.8)~~
4646- D7 CLX only: fix ShlObj.pas: the lines 3554 to 3557 miss a semicolon at the end; FPC won't emulate bugs in the Delphi parser
4747- ~~Linux ONLY : Add dynlibs unit after implementation (LoadLibrary & FreeLibrary needs it).~~ Compiling with the -Sk switch should be enough
4848- Remove sysutils from uses clause of implementation section of QStyle.pas
4949- 2.2.1 only:
5050 - Change {\$R *.xfm} to {\$R *.res} in QFileDialog.pas
5151 - Convert QFileDialog.xfm to resource. It can be done with fpcres utility **from a 2.3.1 snapshot**: `fpcres -of res QFileDialog.xfm`
5252- create a dummy unit to build the clx:\
5353
5454``` pascal
5555unit buildclx;
5656 interface
5757 uses
5858 BindHelp, QDBActns, QFileCtrls,
5959 QActnList, QFileDialog, QSearch,
6060 QButtons, QForms, QStdActns,
6161 QCheckLst, QGraphics, QStdCtrls,
6262 QClipbrd, QGrids, QStyle,
6363 QComCtrls, QImgList, QTypes,
6464 QConsts, QDialogs, QMask,
6565 QControls, QExtCtrls, QMenus,
6666 Qt, QPrinters;
6767 implementation
6868end.
6969```
7070
7171- build the CLX with
7272
73-```
73+```text
7474 fpc -Sd buildclx -Rintel
7575```
7676
7777on windows and
7878
79-```
79+```text
8080 fpc -Sdk buildclx -Rintel
8181```
8282
8383on linux.
8484
8585### Building the DB units
8686
8787Building of the DB units isn't possible yet, however, at least the following steps must be done:
8888
8989- copy the following files into the directory where you put the clx source:
9090 - DB.pas from Sources/Vcl
9191 - SqlTimSt.pas from Sources/Vcl
9292 - DBConsts.pas from Sources/Vcl
9393
9494## Todo
9595
9696As you might guess, there is also stuff to do:
9797
9898- The ClassGrouping functions are only dummies in FPC (StartClassGroup et al.)
9999
100100---
101101*From the Free Pascal wiki, page "Building the CLX with FPC", as it stood on 2013-09-21 after a change by Jwdietrich, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*
102102Category: CLX
103103Category: FPC

Back to history