Rad development on WinCE (1) -- Construction of Lazarus Platform

Source: Internet
Author: User
This article from http://blog.csdn.net/hellogv/ Lazarus Introduction

Lazarus is an IDE similar to Delphi. Its language is free Pascal and its development method is rad. Since 2.2.0 FPC (free Pascal compile), it has supported the Wince-arm platform.

Step 1:
  1. 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.
  2. Download the Lazarus for cross-arm-wince-win32, which can compile the wince code on Lazarus.
Step 2:

Note: it cannot be saved in a path with Chinese characters. If the path contains Chinese characters, compilation fails.

1. Install Lazarus for Win32

2. Install the Lazarus for cross-arm-wince-win32, which can compile the wince code on Lazarus.

Create a Lazarus Project
  1. Start Lazarus and click the form to add an application project:File> New....
  2. 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.
Pre-compilation settings

To compile an arm-wince application, you must first set the compiler properties of the Project. Please click the menu item:Project> compiler options..., ClickPathPage, and adapt the LCL widget to wince. ClickCodePage, and change target platform to arm-wince.

Note:When compiling your wince application, IDE may return the following error message:

Compiling resource *.rcarm-wince-windres.exe: no resources*.PAS(57901) Error: Error while linking*.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.

Simplified EXE after compilation

Find arm-wince-strip.exein the lazarusinstaller folder and drag the exedirectly to arm-wince-strip.exe. Then, the EXE is automatically streamlined, and the 10 MB can be reduced to 1.25 MB, and The UPX can be reduced to kb.

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 setting up the Lazarus platform ".

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.