title: Making Lazarus compile for Windows CE
body: <p>I've been trying to set up Lazarus to compile for Windows CE 5.0, specifically for a Motorola MK-4000. However, I'm not having much success, and the <a href="http://wiki.freepascal.org/Windows_CE_Interface" rel="nofollow noreferrer">instructions to set up the IDE</a> appear to be outdated.</p>
  
  <p>I'm using Lazarus v1.8.4 for Windows x64. </p>
  
  <p>The problem starts when I'm told to download and install <code>cross-arm-wince</code> from the same download page as Lazarus. There is no such thing there. I did however find <a href="https://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2064%20bits/Lazarus%201.8.4/" rel="nofollow noreferrer"><code>lazarus-1.8.4-fpc-3.0.4-cross-i386-win32-win64.exe</code></a> which is the only mention of "cross" I can find. Not what I need, but installed anyway.</p>
  
  <p>Now I go to set up my project in the IDE. I start a new application, but <code>Project -&gt; Project Options -&gt; Compiler Options -&gt; Paths -&gt; LCL Widget Type</code> or <code>Project -&gt; Project Options -&gt; Compiler Options -&gt; Paths -&gt; Select another widget set (Macro LCLWidgetType)</code> are not found, nor do I see any mention of "Widget". </p>
  
  <p>Next two instructions for Target OS and CPU Family are okay, I found those settings and changed to <code>WinCE</code> and <code>arm</code>.</p>
  
  <p>Upon saving project options, I see an error message:</p>
  
  <blockquote>
    <p>Compiler "C:\lazarus\fpc\3.0.4\bin\x86-64-win64\fpc.exe" does not support target arm-wince</p>
  </blockquote>
  
  <p>Except for the "Widget" setting I couldn't find, now I try to go ahead and build a new unaltered application. But to no surprise, I get an error:</p>
  
  <blockquote>
    <p>Error: ppcarm.exe can't be executed, error message: Failed to execute ""ppcarm.exe"  -Twince -MObjFPC -Scghi -O1 -g -gl -l -vewnhibq -FuC:\lazarus\packager\registration\ -FUC:\lazarus\packager\units\arm-wince\ fcllaz.pas</p>
  </blockquote>
  
  <hr>
  
  <p>I went ahead and installed the <code>arm-wince</code> from FPC 3.0.0 (My Lazarus version came with 3.0.4), and it installed into its own FPC directory outside of the Lazarus directory. However I'm extremely new to FPC/Lazarus and have no idea how to make the IDE actually work with the other compiler.</p>
  
  <p>As a dirty trial, I temporarily copied the compilers from the 3.0.0 dir to the 3.0.4 one, and the first attempt failed (I didn't note the error message at that time), but I just tried again and it compiled! Obviously blindly dumping files into the bin is <em>not</em> the appropriate solution, as I'm sure there's a proper way to configure this. It doesn't run on the device anyway, just shows the title in the taskbar and no UI ever opens. </p>
  
  <hr>
  
  <p>What am I missing to get Lazarus to compile for Windows CE? </p>