Skip to content

Delphi Fusion

Narrow screen resolution Wide screen resolution Increase font size Decrease font size Default font size    Default color brown color green color red color blue color
  • Regular Delphi programming articles and tutorials
  • Free members forum supporting everything Delphi
  • Support for all programming abilities
You are here: Home arrow Articles arrow KOL arrow Installing KOL
Skip to content

User Menu

Login
Register
Logout

Latest Threads

Delphi and C++Builder Roadmap
by: Jon!
@: 03/09/08 11:53 am
Delphi 7 Enterprise!
by: uuf6429
@: 17/06/08 01:33 pm
Tracing file/registry activity
by: uuf6429
@: 17/06/08 01:25 pm

Delphi Fusion

Links
Sponsors
Amazon

Donate

Enter Amount:


Warning: Division by zero in /usr/local/psa/home/vhosts/delphifusion.com/httpdocs/mambots/content/geshibot/geshi.class.php on line 2285

Warning: Division by zero in /usr/local/psa/home/vhosts/delphifusion.com/httpdocs/mambots/content/geshibot/geshi.class.php on line 2285

Warning: Division by zero in /usr/local/psa/home/vhosts/delphifusion.com/httpdocs/mambots/content/geshibot/geshi.class.php on line 2285

Warning: Division by zero in /usr/local/psa/home/vhosts/delphifusion.com/httpdocs/mambots/content/geshibot/geshi.class.php on line 2285

Warning: Division by zero in /usr/local/psa/home/vhosts/delphifusion.com/httpdocs/mambots/content/geshibot/geshi.class.php on line 2285

Warning: Division by zero in /usr/local/psa/home/vhosts/delphifusion.com/httpdocs/mambots/content/geshibot/geshi.class.php on line 2285

Warning: Division by zero in /usr/local/psa/home/vhosts/delphifusion.com/httpdocs/mambots/content/geshibot/geshi.class.php on line 2285

Warning: Division by zero in /usr/local/psa/home/vhosts/delphifusion.com/httpdocs/mambots/content/geshibot/geshi.class.php on line 2285

Warning: Division by zero in /usr/local/psa/home/vhosts/delphifusion.com/httpdocs/mambots/content/geshibot/geshi.class.php on line 2285

Warning: Division by zero in /usr/local/psa/home/vhosts/delphifusion.com/httpdocs/mambots/content/geshibot/geshi.class.php on line 2285

Warning: Division by zero in /usr/local/psa/home/vhosts/delphifusion.com/httpdocs/mambots/content/geshibot/geshi.class.php on line 2285

Warning: Division by zero in /usr/local/psa/home/vhosts/delphifusion.com/httpdocs/mambots/content/geshibot/geshi.class.php on line 2285

Warning: Division by zero in /usr/local/psa/home/vhosts/delphifusion.com/httpdocs/mambots/content/geshibot/geshi.class.php on line 2285

Warning: Division by zero in /usr/local/psa/home/vhosts/delphifusion.com/httpdocs/mambots/content/geshibot/geshi.class.php on line 2285

Warning: Division by zero in /usr/local/psa/home/vhosts/delphifusion.com/httpdocs/mambots/content/geshibot/geshi.class.php on line 2285

Warning: Division by zero in /usr/local/psa/home/vhosts/delphifusion.com/httpdocs/mambots/content/geshibot/geshi.class.php on line 2285

Warning: Division by zero in /usr/local/psa/home/vhosts/delphifusion.com/httpdocs/mambots/content/geshibot/geshi.class.php on line 2285

Warning: Division by zero in /usr/local/psa/home/vhosts/delphifusion.com/httpdocs/mambots/content/geshibot/geshi.class.php on line 2285

Warning: Division by zero in /usr/local/psa/home/vhosts/delphifusion.com/httpdocs/mambots/content/geshibot/geshi.class.php on line 2285

Warning: Division by zero in /usr/local/psa/home/vhosts/delphifusion.com/httpdocs/mambots/content/geshibot/geshi.class.php on line 2285

Warning: Division by zero in /usr/local/psa/home/vhosts/delphifusion.com/httpdocs/mambots/content/geshibot/geshi.class.php on line 2285

Warning: Division by zero in /usr/local/psa/home/vhosts/delphifusion.com/httpdocs/mambots/content/geshibot/geshi.class.php on line 2285

Warning: Division by zero in /usr/local/psa/home/vhosts/delphifusion.com/httpdocs/mambots/content/geshibot/geshi.class.php on line 2285

Warning: Division by zero in /usr/local/psa/home/vhosts/delphifusion.com/httpdocs/mambots/content/geshibot/geshi.class.php on line 2285

Warning: Division by zero in /usr/local/psa/home/vhosts/delphifusion.com/httpdocs/mambots/content/geshibot/geshi.class.php on line 2285

Warning: Division by zero in /usr/local/psa/home/vhosts/delphifusion.com/httpdocs/mambots/content/geshibot/geshi.class.php on line 2285

Warning: Division by zero in /usr/local/psa/home/vhosts/delphifusion.com/httpdocs/mambots/content/geshibot/geshi.class.php on line 2285

Warning: Division by zero in /usr/local/psa/home/vhosts/delphifusion.com/httpdocs/mambots/content/geshibot/geshi.class.php on line 2285

Warning: Division by zero in /usr/local/psa/home/vhosts/delphifusion.com/httpdocs/mambots/content/geshibot/geshi.class.php on line 2285

Warning: Division by zero in /usr/local/psa/home/vhosts/delphifusion.com/httpdocs/mambots/content/geshibot/geshi.class.php on line 2285

Warning: Division by zero in /usr/local/psa/home/vhosts/delphifusion.com/httpdocs/mambots/content/geshibot/geshi.class.php on line 2285

Warning: Division by zero in /usr/local/psa/home/vhosts/delphifusion.com/httpdocs/mambots/content/geshibot/geshi.class.php on line 2285

Warning: Division by zero in /usr/local/psa/home/vhosts/delphifusion.com/httpdocs/mambots/content/geshibot/geshi.class.php on line 2285

Warning: Division by zero in /usr/local/psa/home/vhosts/delphifusion.com/httpdocs/mambots/content/geshibot/geshi.class.php on line 2285

Warning: Division by zero in /usr/local/psa/home/vhosts/delphifusion.com/httpdocs/mambots/content/geshibot/geshi.class.php on line 2285

Warning: Division by zero in /usr/local/psa/home/vhosts/delphifusion.com/httpdocs/mambots/content/geshibot/geshi.class.php on line 2285

Warning: Division by zero in /usr/local/psa/home/vhosts/delphifusion.com/httpdocs/mambots/content/geshibot/geshi.class.php on line 2285

Warning: Division by zero in /usr/local/psa/home/vhosts/delphifusion.com/httpdocs/mambots/content/geshibot/geshi.class.php on line 2285

Warning: Division by zero in /usr/local/psa/home/vhosts/delphifusion.com/httpdocs/mambots/content/geshibot/geshi.class.php on line 2285
Installing KOL Print E-mail
Written by Blueaura   

Introduction

This tutorial will attempt to guide new KOL users to installing the files they will need to create KOL based programs.

By using KOL you can vastly reduce the executable size of you applications. Not only that but you can do it quickly and easily. This tutorial however will not deal with the merits of using KOL, for a detailed overview of KOL have a look at Thaddy’s introductory article .

Getting KOL

KOL is available form it’s creator’s website, Vladimir Kladov’s. The archive you need is here , download it and extract the contents to a folder of your choice. I will be using C:\KOL but it’s entirely up to you where you extract the files though I would recommend you put it somewhere easy to access and where it will not get deleted. Putting the files on your desktop is not the best idea, nor is extracting the files directly into the Delphi library directory.

Setting Up

How you set up Delphi to accommodate KOL is version dependant. If you are using Delphi 7 or lower then things are straight forward enough. All you need to do is add the path to the kol.pas file to the projects search path.

Project -> Options -> Directories/Conditionals -> Search Path = C:\KOL

Simple, just declare Kol as a used unit in your project and you can code away.

There is another option to this where you add the path to the library path directories. This method will allow you to just declare kol in the uses section and then code using KOL in any new project without having to do the above.

Project -> Options -> Library -> Library Path = …;C:\KOL


Setting up Delphi 2005 or 2006 is slightly more complex thankfully Thaddy came up with a solution to getting KOL working. You will need to start off by adding a few lines at the end of koldef.inc in your KOL path. Here is what you need to add:

koldef.inc
  1. {Delphi 2005}
  2. {$IFDEF VER170}
  3. {$DEFINE _D3orHigher}
  4. {$DEFINE _D4orHigher}
  5. {$DEFINE _D5orHigher}
  6. {$DEFINE _D6orHigher}
  7. {$DEFINE _D7}
  8. {$DEFINE _D7orHigher}
  9. {$WARN UNIT_DEPRECATED OFF}
  10. {$WARN SYMBOL_PLATFORM OFF}
  11. {$WARN UNSAFE_TYPE OFF}
  12. {$WARN UNSAFE_CAST OFF}
  13. {$WARN UNSAFE_CODE OFF}
  14. {$ENDIF}
  15. {$IFDEF VER180}
  16. {Delphi 2006}
  17. {$DEFINE _D3orHigher}
  18. {$DEFINE _D4orHigher}
  19. {$DEFINE _D5orHigher}
  20. {$DEFINE _D6orHigher}
  21. {$DEFINE _D7}
  22. {$DEFINE _D7orHigher}
  23. {$WARN UNIT_DEPRECATED OFF}
  24. {$WARN SYMBOL_PLATFORM OFF}
  25. {$WARN UNSAFE_TYPE OFF}
  26. {$WARN UNSAFE_CAST OFF}
  27. {$WARN UNSAFE_CODE OFF}
  28. {$ENDIF}
  29. {.$DEFINE ASM_VERSION}
 

This addition will not interfere with any other versions of Delphi you have installed working with KOL so no need to worry about that.

Just as with previous versions of Delphi you now need to add the KOL path to either the library path or as a search path in each individual project. In Delphi 2006 you can navigate to these options like this:

Tools -> Options -> Environment Options -> Delphi Options ->
Library – Win32 -> Library Path = …;C:\KOL
or
Project -> Options -> Directories/Conditionals -> Search Path = C:\KOL

Almost finished but not quite yet, this part is arguably the most crucial part. Trust me if you forget this part on each project you may be scratching your head and debugging your code for days before you realise the problem (believe me). You need to add PAS_VERSION to the conditional defines.

Project -> Options -> Directories/Conditionals ->
Conditional Defines = PAS_VERSION

Finishing Touches

Which ever version of Delphi you are using KOL will now be setup and ready to code. Try a quick, simple program to see if everything is working.

Sample KOL Application
  1. program FirstKol;
  2. uses
  3. Windows, Kol;
  4. begin
  5. Applet := Newform(nil,'Project1');
  6. Run(Applet);
  7. end.
 
Read or add comments about this item.
No. 1 :
New versions of KOL have now fixed koldef.inc so there is no need to edit it.
Submitted by Blueaura • 2007-03-23 21:03:41
No. 2 : Turbo
Hi, Will KOL work with TurboDelphi as well? - Rog
Submitted by Unregistered User • 2007-05-25 21:37:17
No. 3 : Yes to turbo
Yes, this should work 100% with Delphi turbo (although I have not tested it) because it does not add any components, just units which you need to add to the uses section.

MCK however may not be Delphi Turbo Explorer compatible because it does use extra components.
Website
Submitted by Blueaura • 2007-05-26 00:45:34
Please keep your comments brief and on topic, and remember that this is not a discussion thread.
Name : E-mail :
Title : Website :
Comment(s) :
J! Reactions Commenting Software
General Site License
Copyright © 2006 S. A. DeCaro
 
< Prev