Reposted on the Internet and modified it! This article from http://blog.csdn.net/hellogv/ Kol Introduction
KOL-CE is also built on free Pascal + Lazarus, but it can be built on a very streamlined Win32/wince GUI Program (if the project contains only one empty window, the build Code only occupies about 40 kb, including the control occupies about 1 MB ).
Comparison between kol and LCL (window + one button + 0 code)
| |
After compilation |
Strip Processing |
UPX Processing |
Memory occupied by running |
| Kol |
& Gt; = 0.98 MB |
Cannot handle |
323kb |
2.6 MB |
| LCL |
> 10 MB |
Approximately 1.25 MB |
346kb |
2.8 mb |
In contrast, Kol is more streamlined, but LCL is more powerful!
Step 1 of Kol platform construction:
- Download Lazarus for Win32, to the http://sourceforge.net/projects/lazarus/ to download the latest version of Lazarus for Win32, generally Lazarus has been bundled with FPC together.
- Download the Lazarus for cross-arm-wince-win32, which can compile the wince code on Lazarus.
- Download Kol for CE at: http://sourceforge.net/projects/kol-ce/
Step 2:
Note: it cannot be saved in a path with Chinese characters
1. Install Lazarus for Win32
2. Install the Lazarus for cross-arm-wince-win32, which can compile the wince code on Lazarus.
3. IDE processing:
- Run Lazarus.
- Click a menu item:Tools> Configure "build Lazarus "...
- InQuick build optionsClickClean up + build allProject.
- EnableAdvanced build optionsPage, andOptionsIn this dialog box, add-DdisablefakemethodsThis set string.
- ClickBuildPress the button to re-build Lazarus.
4. Install Kol
- Execute Lazarus and click the menu itemComponents> open package file (. LPK)And then findMckDirectory of the suite, and selectMirrorkolpackage. LPKThis file.
- The kit window will jump out at this time. Please pressInstallPress the key.
- Lazarus will compile the mck suite and re-Execute Lazarus IDE.
- After Lazarus ide re-appears, the Kol page appears on the component disk.
Create a kol Project
- Start Lazarus and click the form to add an application project:File> New....
- Do not rush after adding a project! Do not put any components at this time. archive the project first and click the DIRECTORY Options:File> Save allAnd select the directory where you want to store the project files.
Please note! All files of the project must be stored in the same directory. You can change the unit file name of the form at any time.Project1.lpi.
- Drag oneTkolprojectPut the component on the form (this control controls the project directly ).
- SetProjectdestThis attribute is used to change the name of the mck Project (path does not need to be included ). If you enterMykolprogYour mck project name will automatically becomeMykolprog. LPIAnd the generated execution file will also be namedMykolprog.exe.
- PutTkolformDrag and Drop this component onto the form (this control controls the window directly. We recommend that you keep the properties of the original window unchanged and modify only the properties of this control to change the properties of the window runtime ).
- Save the current project.
- Please enableProjectdestThe name of the project set in the property (in the previous example, it should beMykolprog. LPI, Which can be found in the same directory. Then, you canProject1 .*And will not be used in the future.
Set
To compile an arm-wince application, you must first set the compiler properties of the Project. Please click the menu item:Project> compiler options..., ClickCodePage, and change target platform to arm-wince, as shown in the figure below.
Note:When compiling your wince application, IDE may return the following error message:
Compiling resource KOL-CE.rcarm-wince-windres.exe: no resourcesKOL.PAS(57901) Error: Error while linkingKOL.PAS(57901) Fatal: There were 1 errors compiling module, stopping
In this case, you need to edit the Windows environment variableInUser variablePathTo add the FPC compiler path of the Win32 platform. If you do not know which path to add, click the Lazarus menu item:Environment optionsThen, you can see the information in the compiler path field. You only need the folder path.Do not change the path in Lazarus and leave Lazarus.. Right click on the "my computer" icon, select ''content ''in the directory, and clickAdvancedClickEnvironment VariableThis button can be edited.PathThe environment variable.
Note: If the "lazarusresources" error occurs during compilation, You Need To uninstall Lazarus, delete the installation folder of Lazarus, reinstall it again, and re-operate "Step 2 of Kol platform building ".