KControls 1.7 + WinCE lazarus / 35-Windows CE ---------------------------------------------------------------------- CrazyDron · 2016-05-03 06:32 Good day! I try to install KControls package on clean build of Lazarus Win32+cross_arm_ce. Operating system - Win7 x64. I add control TKGrid on form, compile it and run. It works. But when I change project options to: 1. Target OS: WinCE 2. Target CPU: arm compilation stops at unit CairoCanvas and says cairocanvas.pas(17,13) Fatal: Cannot find unit Cairo, used in CairoCanvas of package cairocanvas_pkg. Units Pango, PangoCairo, GLib2 are not founded too. As I understand - cannot put i386-units into arm-ce compiler. Maybe someone can help me? UPD: my first step was writing to developer. He says: I think your Lazarus installation or build configuration is corrupt under Linux or not ready for cross compiling. I am not expert here. Please search or ask on Lazarus forum http://forum.lazarus.freepascal.org/. There are many clever people that might be able to help you. ---------------------------------------------------------------------- zmoky · 2017-01-17 20:49 I have a similar problem. I installed from sourceforge: lazarus-1.6.2-fpc-3.0.0-win32.exe lazarus-1.6.2-fpc-3.0.0-cross-arm-wince-win32.exe And for LCL Widget Type: wince, Target OS: WinCE, Target CPU: arm I get: Code: [Select]Hint: (11030) Start of reading config file C:\lazarus\fpc\3.0.0\bin\i386-win32\fpc.cfg Hint: (11031) End of reading config file C:\lazarus\fpc\3.0.0\bin\i386-win32\fpc.cfg Free Pascal Compiler version 3.0.0 [2016/11/12] for arm Copyright (c) 1993-2015 by Florian Klaempfl and others (1002) Target OS: WinCE for ARM (3104) Compiling cairocanvas_pkg.pas (3104) Compiling cairocanvasall.pas (3104) Compiling cairocanvas.pas C:\lazarus\components\cairocanvas\cairocanvas.pas(17,13) Fatal: (10022) Can't find unit Cairo used by CairoCanvas Fatal: (1018) Compilation aborted Error: C:\lazarus\fpc\3.0.0\bin\i386-win32\ppcrossarm.exe returned an error exitcode Hint: (11030) Start of reading config file C:\lazarus\fpc\3.0.0\bin\i386-win32\fpc.cfg Hint: (11031) End of reading config file C:\lazarus\fpc\3.0.0\bin\i386-win32\fpc.cfg Free Pascal Compiler version 3.0.0 [2016/11/12] for arm Copyright (c) 1993-2015 by Florian Klaempfl and others (1002) Target OS: WinCE for ARM (3104) Compiling lhelpcontrolpkg.pas Free Pascal Compiler version 3.0.0 [2016/11/12] for arm Copyright (c) 1993-2015 by Florian Klaempfl and others (1002) Target OS: WinCE for ARM (3104) Compiling pascalscript.pas (3104) Compiling PascalScript_Core_Reg.pas Hint: (11030) Start of reading config file C:\lazarus\fpc\3.0.0\bin\i386-win32\fpc.cfg Hint: (11031) End of reading config file C:\lazarus\fpc\3.0.0\bin\i386-win32\fpc.cfg Free Pascal Compiler version 3.0.0 [2016/11/12] for arm Copyright (c) 1993-2015 by Florian Klaempfl and others (1002) Target OS: WinCE for ARM (3104) Compiling datetimectrls.pas Hint: (11030) Start of reading config file C:\lazarus\fpc\3.0.0\bin\i386-win32\fpc.cfg Hint: (11031) End of reading config file C:\lazarus\fpc\3.0.0\bin\i386-win32\fpc.cfg Free Pascal Compiler version 3.0.0 [2016/11/12] for arm Copyright (c) 1993-2015 by Florian Klaempfl and others (1002) Target OS: WinCE for ARM (3104) Compiling dbflaz.pas Hint: (11030) Start of reading config file C:\lazarus\fpc\3.0.0\bin\i386-win32\fpc.cfg Hint: (11031) End of reading config file C:\lazarus\fpc\3.0.0\bin\i386-win32\fpc.cfg Free Pascal Compiler version 3.0.0 [2016/11/12] for arm Copyright (c) 1993-2015 by Florian Klaempfl and others (1002) Target OS: WinCE for ARM (3104) Compiling externhelp.pas Hint: (11030) Start of reading config file C:\lazarus\fpc\3.0.0\bin\i386-win32\fpc.cfg Hint: (11031) End of reading config file C:\lazarus\fpc\3.0.0\bin\i386-win32\fpc.cfg Free Pascal Compiler version 3.0.0 [2016/11/12] for arm Copyright (c) 1993-2015 by Florian Klaempfl and others (1002) Target OS: WinCE for ARM (3104) Compiling fpcunitide.pas Hint: (11030) Start of reading config file C:\lazarus\fpc\3.0.0\bin\i386-win32\fpc.cfg Hint: (11031) End of reading config file C:\lazarus\fpc\3.0.0\bin\i386-win32\fpc.cfg Free Pascal Compiler version 3.0.0 [2016/11/12] for arm Copyright (c) 1993-2015 by Florian Klaempfl and others (1002) Target OS: WinCE for ARM (3104) Compiling instantfpclaz.pas (3104) Compiling instantfpcregisterlaz.pas ---------------------------------------------------------------------- CrazyDron · 2017-01-18 05:22 zmoky, I try lot of variants. Works only one: Lazarus 0.9.28 beta + latest KControls. Works both under x86 and arm/ce. So I'm using two versions together. When I need to build very small exe - working in 0.9.28+KControls, normal work is doing in 1.4.4/1.6.2. ---------------------------------------------------------------------- tk · 2017-01-18 12:53 Since I am the author of KControls, can I somehow simulate WinCE target on Windows? I don't have a physical WinCE device. I would like to test it with Lazarus 1.7. If it works with 0.9.28 then clearly there are only some minor issues. Shortly reviewed this http://wiki.lazarus.freepascal.org/WinCE_Programming_Tips but did not find anything. Btw. Are there still many people using WinCE? Thought it was a dead technology. ---------------------------------------------------------------------- CrazyDron · 2017-01-18 13:09 tk, it's good to see author here  Yes, some people uses WinCE-programming. For example, here is my software: http://4pda.ru/forum/index.php?showtopic=721507 At spoiler "Additional software" (Дополнительный софт) - first file is WinCE-emulator from Microsoft, tuned for our tasks. Therefore - you can use it for launching arm/ce-exe's. ---------------------------------------------------------------------- tk · 2017-01-18 13:43 Quote from: CrazyDron on January 18, 2017, 02:09:56 pmAt spoiler "Additional software" (Дополнительный софт) - first file is WinCE- emulator from Microsoft, tuned for our tasks. Therefore - you can use it for launching arm/ce-exe's. Luckily I had some Russian at school. But when I click on WinCE_Emu.zip I get Error 404. ---------------------------------------------------------------------- CrazyDron · 2017-01-18 16:30 Quote from: tk on January 18, 2017, 02:43:15 pmI get Error 404. I forgot You should register to use full functionality. Here is the mirror: https://yadi.sk/d/8nrjjOzI39gS2p Download is "Скачать". ---------------------------------------------------------------------- tk · 2017-01-19 00:46 Quote from: CrazyDron on May 03, 2016, 08:32:11 amWorks only one: Lazarus 0.9.28 beta + latest KControls. Works both under x86 and arm/ce. I don't have 0.9.28 anymore, but can you confirm that a fresh WinCE application works for you in 0.9.28, when you drop Dialogs/TPrinterSetupDialog on your main form? Or alternatively when you add Printers4Lazarus package as project dependency? If this works then Printers4Lazarus is clearly broken under WinCE in newer Lazarus versions. ---------------------------------------------------------------------- CrazyDron · 2017-01-19 13:03 I think that we don't need v0.9.28 anymore  Even so, here is old version: https://yadi.sk/d/g5waXNLr39pRCT ---------------------------------------------------------------------- tk · 2017-01-19 15:24 Quote from: CrazyDron on January 19, 2017, 02:03:26 pmI think that we don't need v0.9.28 anymore  Why? I thought KControls worked for you in this version. For me, this version does not work even with a simple fresh app. Get following errors: Code: [Select]windres: can't open file `TForm1': No such file or directory Hint: Start of reading config file c:\lazarus\fpc\2.2.4\bin\i386-win32\fpc.cfg Hint: End of reading config file c:\lazarus\fpc\2.2.4\bin\i386-win32\fpc.cfg Free Pascal Compiler version 2.2.4 [2009/09/29] for arm Copyright (c) 1993-2008 by Florian Klaempfl Target OS: WinCE for ARM Compiling project1.lpr Compiling unit1.pas Assembling unit1 Compiling resource D:\Data\Delphi\Test\WinCETest\unit1.lfm c:\lazarus\fpc\2.2.4\bin\i386-win32\arm-wince-windres.exe: can't open file `TForm1': No such file or directory unit1.pas(27) Error: Error while linking unit1.pas(27) Fatal: There were 1 errors compiling module, stopping And I am really in doubt Printers4Lazarus package (->KControls) would work there. In Lazarus 1.7 I am at least able to build a simple fresh app for WinCE/arm. Anyway, I could not connect to and debug in your emulator at all, don't know how to setup it. The manual (http://wiki.freepascal.org/Windows_CE_Interface) did not work for me either (having only Win7x64 and Win10 now). For example, I could not setup Windows Mobile 6.5 Developer Tool Kit at all. To proceed further, could you please answer my previous question whether you can use Printers4Lazarus or TPrinterSetupDialog in your WinCE applications (compiled in Lazarus v0.9.28 beta where you previously stated Kcontrols worked)? If yes then Printers4Lazarus is broken -> Lazarus bug. If not then WinCE widgetset is incomplete -> KControls cannot be used as such with WinCE widgetset because it requires this package. You would need to delete Printers4Lazarus from KControls dependencies and remove all stuff that uses it, for now it is only PrintersDlgs unit in file kprintsetup.pas so it should not be that hard. EDIT: Discovered now this http://wiki.lazarus.freepascal.org/Roadmap#Status_ of_dialogs_on_each_LCL_Interface -> TPrinterSetupDialog not implemented under WinCE. This explains everything. So KControls couldn't work with WinCE widgetset without above modifications (well, maybe some old version which did not have the Printers4Lazarus dependency). I made modifications in the KControls trunk. Now it is possible to compile KControlsLaz package under WinCE with newest Lazarus + FPC (both from trunks). All you have to do is to remove Printer4Lazarus package form the KControlsLaz package dependencies (you may want to make a copy of KControlsLaz.lpk for that). ---------------------------------------------------------------------- zmoky · 2017-01-19 18:40 Quote from: CrazyDron on January 18, 2017, 06:22:48 amzmoky, I try lot of variants. Works only one: Lazarus 0.9.28 beta + latest KControls. Works both under x86 and arm/ce. So I'm using two versions together. When I need to build very small exe - working in 0.9.28+KControls, normal work is doing in 1.4.4/1.6.2. I am writing to all the threads that I read and related to my issue, with the working solution Compiling sample app with a button for closing it, using the following setup: Target OS: WinCE Target CPU family: arm Target processor: Default LCLWidgetType:=wince Installed sourceforge Lazarus in this order:     - lazarus-1.6.2-fpc-3.0.0-win32.exe     - lazarus-1.6.2-fpc-3.0.0-cross-arm-wince-win32.exe Tested on hardware:     - Symbol MC2180 Windows CE 6.0 Core with Marvell PXA 320 CPU     - Intermec Windows Embedded Handheld 6.5 Classic ( Windows CE 5.2.29354 ) with ARM Cortex-A8 OMAP3 processor It worked on the WinCE 5.2.x but did not reacted in any way when I stared the app on the Win CE 6.0 Core. After I copied the aygshell.dll file in the same dir with the app it started to work also on Windows CE 6.0 ( MC2180 ). I used the http://hpcmonex.net/izemize.htm aygshell collection, file 12 ( size: 22,016 bytes ). For any questions related to dev in the os and hw above you can contact me on my gmail id: zmooky. I send my thanks to the fpc team for the great work that they did !