How to convert program in order to make it usable in x32 platform? lazarus / 9-Editor ---------------------------------------------------------------------- Mariius · 2012-04-03 18:04 Okay, so I made a little program. Since I use Windows 7 os's x64 platform, I use x64 (obviously) lazarus version. I made my program, compiled it, and it runs just fine, but my friends with x32 platfrom os's can't run this program. How to convert my program in order for it to be usable in x32 platfrom windows systems? Thanks ---------------------------------------------------------------------- BlueIcaro · 2012-04-03 18:08 Hi, you should compile your program with a Lazarus 32 bit version, because as I know there's not a simple way to crosscompile 64/32 bits.  Also I have W7/64 bits, and I have a virtual machine of XP, with other version of Lazarus, also I have virtual machine with ubuntu and Lazarus, and I use it to compile my program to Linux. /BlueIcaro ---------------------------------------------------------------------- Mariius · 2012-04-03 18:12 Quote from: BlueIcaro on April 03, 2012, 08:08:54 pmHi, you should compile your program with a Lazarus 32 bit version, because as I know there's not a simple way to crosscompile 64/32 bits.  Also I have W7/64 bits, and I have a virtual machine of XP, with other version of Lazarus, also I have virtual machine with ubuntu and Lazarus, and I use it to compile my program to Linux. /BlueIcaro So you say I should use virtual machine in order to convert my programs to x32 format? Many thanks Haven't thought about it ---------------------------------------------------------------------- BlueIcaro · 2012-04-03 19:10 Yes, I don't know if there is other way to do it, like crosscompile, or installing/editing fpc files, etc. But For my the best way is use a VM. /BlueIcaro ---------------------------------------------------------------------- Leledumbo · 2012-04-04 01:39 For Win64->Win32, I guess it's better to use cross compiling. Win64 CAN run Win32 programs, therefore you could also test the program in your computer. Cross compiling to Win32 also doesn't require additional external tools and libraries. ---------------------------------------------------------------------- Takeda · 2012-04-04 02:29 Quote from: Mariius on April 03, 2012, 08:04:21 pmOkay, so I made a little program. Since I use Windows 7 os's x64 platform, I use x64 (obviously) lazarus version. I made my program, compiled it, and it runs just fine, but my friends with x32 platfrom os's can't run this program. How to convert my program in order for it to be usable in x32 platfrom windows systems? Thanks If your Lazarus installation use FPC stable (e.g. FPC 2.6.0) then you're safe to replaced it. 1. Go to sourceforge Download all inside ( http://sourceforge.net/projects/freepascal/files/Win32/2.6.0/ ) 2. Go to sourceforge Download the source code of FPC ( http://sourcefo rge.net/projects/freepascal/files/Source/2.6.0/fpc- 2.6.0.source.zip/download ) 3. Install all binary from the installer that you have download (no.1) 4. Copy folder "bin" "msg" "Units", from FPC installation directory that you have installed no.3, put it into (let we say) "C:\iFPC\2.6.0" 5. Extract the source-code of FPC that you have download (no.2), Copy folder "packages" and "rtl" into (let we say) "C:\iFPC\2.6.0\source" 6. Open your Lazarus then go to "MENU : Tools -> Options",      - type "C:\iFPC\2.6.0\i386-win32\fpc.exe" on "Compiler Path"       - type "C:\iFPC\2.6.0\i386-win32\make.exe" on "Make Path"      - type "C:\iFPC\2.6.0\source" on "FPC Source Directory"      - type "C:\iFPC\2.6.0\msg\errore.msg" (use it if you're want to use English message output) on "Compiler Message language file"      - go to node tree Debugger (MENU : Tools -> Options -> Debugger), then type "C:\iFPC\2.6.0\i386-win32\gdb.exe" on Debugger Type and        Set  "GNU Debugger (GDB)" on type 7. Now, Uninstall the current FPC from "Add or Remove program" in control panel. 8. Reboot your machine. 9. Run your Lazarus, then go to MENU : Tools -> Configure "Build Lazarus" ". Choose Profile Build "Optimized" set it "Clean All". Then "Save" 10. Go to MENU : -> Tools -> Build Lazarus with profile : .. ". That's it! Now, even you have capability to build app for Win32, Win64, and WinCE ! (NOTE, of course you must set your project to OS Target : Win64 Target : CPU x86_64 to built Win64 app, set to OS Target : Win32 CPU Target : i386  to build Win32 app, and set to OS Target : WinCE CPU Target : arm to built WinCE app) To Set CPU Target and OS Target go to MENU : Project -> Project options -> Code Generation It would be better if you're using Lazarus 0.9.31 or higher (trunk/snapshot now have Lazarus 1.1) and your installation Lazarus is Win32, since Lazarus Win32 would serve you well, especially for debugging. Regards, Takeda. ---------------------------------------------------------------------- BigChimp · 2012-04-04 05:36 You could also set up separate installs of Lazarus for Win32 and Win64 (using --primary-config-path). Takeda's way of doing things is nice, but IIRC, you still have to switch the debugger (between 64 bit gdb and 32 bit gdb) manually. Additionally, some of the database components are not available/enabled on Win64 (Oracle, PostgreSQL). If that could be a problem, you might want to stick with x86.