With the release of version 2.0.0 the Freepascal team reached a new height in compatibility with Delphi. The Key Objects library has long since supported Freepascal, with a set of conditional defines and special library add-ons. Now, however, the Freepascal 2.0.0 compiler is compatible enough to compile Kol.pas 2.10 without any changes. You can alternatively download a fully prepared package here. That file contains the necessary support files to compile Kol applications and some examples. You can also download only these support files. Here you can find the very good FPCShell 1.17 editor for Freepascal 2.0.0 that explicitly supports KOL as well!. | ||
Preparing FPC.CFGIn order to work with KOL, we will either have to pass the right compiler settings when we compile, or adapt FPC.CFG. These are my own settings for kolfpc.cfg which have proven to work reliably. I recommend you save the file to the left as kolfpc.cfg in your kol source directory and use the following commandline parameters to compile: >fpc -n @kolfpc.cfg -dRELEASE <SOURCE> | #Adapt the paths to point to your own FPC directory -Fuc:\FPC\/units/$FPCTARGET/ | |
Preparing delphidef.inc | Simply comment ASM_VERSION with a dot like so: {.$DEFINE ASM VERSION} or add {$DEFINE PAS_VERSION} | |
Example projectIn order to check if everything is ok, here's a small example program that we now should be able to compile: Save it as project1.dpr and compile it like this: >fpc -n @kolfpc.cfg -dRELEASE project1.dpr You should end up with a nice executable of about 40K in size.
|
|
评论