Compiler settings for Linx 8 tablet lazarus / 34-Windows ---------------------------------------------------------------------- Pi · 2015-01-10 07:13 Could someone please tell me what compiler options I need to use to have my Lazarus application work on a Linx 8 tablet (which runs Windows 8.1, CPU is quad core Intel Atom Z3735F)? The current settings I used (with my Windows 7 PC, 64 bit), is "Target OS" (blank), "Target CPU Family" (blank), "Target processor" (default). When I copy the program to the Linx 8 tablet and click on it on the tablet it says "This app can't run on your PC". Do you know what settings I need to use/change (I did try using some different settings but it came up with errors)? ---------------------------------------------------------------------- marcov · 2015-01-10 14:29 Can you run any other desktop applications? Maybe it only runs "apps", which use a different framework (and FPC does not support it). The CPU should not be a problem. ---------------------------------------------------------------------- Pi · 2015-01-10 14:57 I've just tried copying an old version of one of my Lazarus programs (a calculator that uses a form) that says as part of the file name "compiled-on-win-vista". And that runs okay on the Linx 8 tablet (after copying it to a USB stick and clicking on the program in explorer on the tablet). So that version runs (the Lazarus program where the .exe is dated 2012 (might have been copied on that date rather than compiled on that date), compiled with Windows Vista), but when I compile a Lazarus program with the settings I'm currently using from my current Windows 7 PC, it doesn't run on the Linx 8 tablet (which runs Windows 8.1). ---------------------------------------------------------------------- ttomas · 2015-01-10 16:12 Check your tablet windows 8 build - System. For low disk devices usual is 32bit windows version and you build 64bit application on W7 64bit. Try to buld 32b application. ---------------------------------------------------------------------- Pi · 2015-01-10 16:30 Quote from: ttomas on January 10, 2015, 05:12:20 pmCheck your tablet windows 8 build - System. For low disk devices usual is 32bit windows version and you build 64bit application on W7 64bit. Try to buld 32b application. Thanks, but what settings do I change for that (and to what)? As above, with my Windows 7 PC, (64 bit), it is set to "Target OS" (blank), "Target CPU Family" (blank), "Target processor" (default), it compiles okay. If I then change "Target OS" to "Win 32" and then click "okay" it says "This project uses target OS=Win32 and CPU=x86_64. The system.ppu for this target was not found in the FPC binary directories...". What should I change the "Target CPU family to?". The ones I've tried (with the above change to Target OS) come up with the same error. There's no "x86_32" in the list, but there is an "x86_64" in the list. In Project Options, for Target CPU family the list has "(Default), arm, i386, m68k, powerpc, sparc, x86_64" (there is no x86_32 option listed). ---------------------------------------------------------------------- Windsurfer · 2015-01-10 17:27 Try i386. This is the generic 32 bit Intel chip. ---------------------------------------------------------------------- Pi · 2015-01-11 02:59 I try that and it says: QuoteThe project uses Target OS=win32 and CPU=i386. The system.ppu for this target was not found in the FPC binary directories. Make sure fpc is installed correctly for this target and the fpc.cfg contains the right directories. If I do a windows search for system.ppu in c:\Lazarus, the only one it finds is in "c:\lazarus\fpc\2.6.0\units\x86_64-win64\rtl". ---------------------------------------------------------------------- Windsurfer · 2015-01-12 20:05 In Tools|Configure/Build Lazarus click the Build or Build all buttons at the bottom of the window. ---------------------------------------------------------------------- Pi · 2015-01-14 03:37 Quote from: Windsurfer on January 12, 2015, 09:05:21 pmIn Tools|Configure/Build Lazarus click the Build or Build all buttons at the bottom of the window. Thanks. Though when I run "Tools|Configure "Build Lazarus" (I've just tried it again now and it comes up with the "Error: ppc386.exe can't be executed" message as shown below) and then go to project options->code generation-Test it says QuoteWarning: unit search path does not exist c:\lazarus\lcl\units\i386-win32 Warning: unit search path does not exist c:\lazaurs\lcl\units\i386-win32\win32 Warning: unit search path does not exist c:\lazarus\packager\units\i386-win32 ERROR: compiled FPC unit not found: system.ppu etc. then after closing the window says: QuoteThis project uses target OS=win32 and CPU=i386. The system.ppu for this target was not found in the FPC binary directories... If I select "Clean up + Build all" from "configure "Build Lazarus"", then Build, then run->Build it says "Error: ppc386.exe can't be executed, error message: Failed to execute ""ppc386.exe" -MObjFPC -Scgi -O1 -Twin32 -gl -vewnhi -l FuC:\lazarus\ideintf\units\i386-win32 c-FuC:\lazarus\lcl\units\i386-win32 ..." In the lcl\units directory the only subdirectory is "x86_64-win64". -------- Are these problems with my version of Lazarus (Lazarus version 0.9.30.4) that are preventing the 64 bit version of Lazarus creating a 32 bit version of a program, and have these been fixed in a later Lazarus version - so could installing a later Lazarus version fix it? Or do you know of anything else I can do to fix it? ---------------------------------------------------------------------- edvard · 2015-01-14 04:39 You might want to upgrade your version of lazarus The best way to cross-compile 32- and 64-bit on Windows is to actually install Win32 version of Lazarus, and the cross-compile-32-to-64 package.  You can get those here: http://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2032%2 0bits/Lazarus%201.2.6/ I can testify that it works on my son's Windows 7 laptop; I have successfully built both 32- and 64-bit binaries with it like this.  The chipset in the Linx 8 is 64-bit but the OS is 32-bit, so for settings you'll definitely want to at least set 'Target OS' to 'Win32'.  Go ahead and try 'Target CPU' at 'x86_64' and if it doesn't work, set it to 'i386'.  If that doesn't work, try setting 'Target Processor' to 'Pentium M' and go back from there (try 'Pentium IV' next, then 'Pentium III', etc.). Eventually, one of those combinations will work. ... And if you're adventurous and want to try compiling your own, see this thread: http://forum.lazarus.freepascal.org/index.php?topic=8514.0 ---------------------------------------------------------------------- Pi · 2015-01-14 13:09 Thanks edvard (and thanks everyone else who helped too). I installed the 32 bit version of Lazarus (version 1.2.6) (I still have current 64 bit one installed) and the cross compiler (haven't used the cross compiler yet). Though it's a shame there isn't a 64 bit version of Lazarus that does everything (able to compile to 32 bit or 64 bit without any problems - so I just had one (64 bit) Lazarus IDE that did it all - so there's less chance of me making a mistake and altering programs using the wrong Lazarus version or something - it seems there's still issues with free pascal versions). The Lazarus program I've just compiled (which I assume is compiled to a 32 bit .exe) is now running okay on the Linx 8 tablet  . (plus it should mean the program should also work if I need to demo it on a Windows XP machine as that windows version would need 32 bit too). Though using this tablet takes a bit of getting used to but that's something else - maybe I need a stylus for it. But it's working with my Lazarus program - thanks!