Forum > Windows
64bit Development Environment Setup basics
TheRaven:
Developing 64bit Applications with FPC and Lazarus IDE, "FPC Lazarus 64bit Development Notes"
29-Sep-2016
The following instruction/methodology was performed and compiled using: Windows 10 Professional 64bit, lazarus-1.6.0-fpc-3.0.0-win64.exe Lazarus IDE 64bit and the fpc-3.0.0.i386-win32.cross.x86_64-win64.exe 32bit to 64bit cross compiler.
Purpose:
Provide step-wise instruction for obtaining, installing and configuring FPC and Lazarus IDE for developing 64bit Windows applications. Most threads and instruction discuss compiling the compiler and IDE from source or are inconclusive offering little help for developers trying to establish stable 64bit development environments. The following matter addresses installation semantics in a lite and meaningful manner without getting overly detailed and misdirected.
Warning:
Ensure that you don't have any lingering Lazarus User AppData from pre-existing installations --this will cause problems if the installations are not identical. Lazarus IDE Secondary Installations automate a work-around for having multiple Lazarus installations that must persist independently --simply check the Secondary Installation box when installing the IDE then choose a directory for configuration data and continue getting set-up from there.
Displaying hidden folders in Windows 10 Explorer:
To show hidden folders in Windows 10 click the View tab of Explorer and check the Hidden items box on the right side of the menu ribbon and you are ready to roll out.
Lazarus IDE AppData location:
User Folder (for your account)\AppData\Local\lazarus --you may have to "un-hide" hidden folders to access AppData.
01. Download lazarus-1.6.0-fpc-3.0.0-win64.exe from SourceForge;
02. Download fpc-3.0.0.i386-win32.cross.x86_64-win64.exe from SourceForge;
03. Right-click lazarus-1.6.0-fpc-3.0.0-win64.exe and check the "Unblock" box;
04. Right-click fpc-3.0.0.i386-win32.cross.x86_64-win64.exe and check the "Unblock" box;
05. Install lazarus-1.6.0-fpc-3.0.0-win64.exe (best if done as admin to the root drive C:\ of Windows);
06. Install fpc-3.0.0.i386-win32.cross.x86_64-win64.exe to the Lazarus/fpc/fpc version directory (preferrably as admin);
07. Start Lazarus IDE Click Tools then select Configure "Build Lazarus" ... from the menu drop down;
08. Change Target OS: to Win64 and Target CPU: to x86_64 leaving everything else default then click Build;
09. Let Lazarus rebuild itself, it will automatically re-start itself;
10. Click Project then select Project Options;
11. Click Config and Target of Compiler Options on the left side of the dialog;
12. Locate Target platform on the right side of the dialog;
13. Change Target OS (-T) to Win64;
14. Change Target CPU family (-P) to x86_64;
15. Click the OK button and you are ready to develop a 64bit FPC GUI application system.
NOTICE:
You must install the 64bit version of Lazarus IDE in order to develop 64bit FPC GUI applications; you must also install the FPC cross compiler mentioned above. I had issue with installing the cross compiler anywhere outside the nested FPC direcory in the Lazarus IDE installation directory --it would not work anywhere else. You may want to start a new project after getting setup by re-starting Lazarus IDE then do a run, open Windows Task Manager and verify the 'project1.exe' and not 'project1.exe (32bit)'. If the application process is identified as project1.exe then Lazarus is building 64bit applications by default --you're all set.
Example Installation:
C:\lazarus for the default install path for the 64bit Lazarus IDE installation.
C:\lazarus\fpc\3.0.0 for the fpc-3.0.0.i386-win32.cross.x86_64-win64.exe cross-compiler.
Any questions or suggestions for quality purposes concerning this thread's content will be considered when possible. This content is aimed at being precise, succinct and easily digestable; if you (the reader) have not understood the directions in your first read through or something seems unclear say so below in the comments.
molly:
Perhaps i'm missing something here... in which case i apologize upfront, but:
--- Quote ---05. Install lazarus-1.6.0-fpc-3.0.0-win64.exe (best if done as admin to the root drive C:\ of Windows);
--- End quote ---
We're installing the 64 bit version of Lazarus. That's ok.
--- Quote ---06. Install fpc-3.0.0.i386-win32.cross.x86_64-win64.exe to the Lazarus/fpc/fpc version directory (preferrably as admin);
--- End quote ---
Now we're installing the 32-bit version of FPC able to cross-compile to 64-bit.... that's just plain weird ?
I would expected to install lazarus-1.6.0-fpc-3.0.0-cross-i386-win32-win64.exe so that someone is also able to target 32-bit windows.
--- Quote ---07. Start Lazarus IDE Click Tools then select Configure "Build Lazarus" ... from the menu drop down;
08. Change Target OS: to Win64 and Target CPU: to x86_64 leaving everything else default then click Build;
--- End quote ---
We are rebuilding the 64 bit version of Lazarus to create... a 64-bit version of Lazarus.... seems redundant to me ?
Thaddy:
Oooooh and how about this kind of advice:
--- Quote ---
05. Install lazarus-1.6.0-fpc-3.0.0-win64.exe (best if done as admin to the root drive C:\ of Windows);
06. Install fpc-3.0.0.i386-win32.cross.x86_64-win64.exe to the Lazarus/fpc/fpc version directory (preferrably as admin);
--- End quote ---
OF COURSE NOT!
molly:
--- Quote from: Thaddy on September 29, 2016, 10:25:18 am ---OF COURSE NOT!
--- End quote ---
Good. It is not only me (i actually thought i had some weird kind of memory twist that blocked me from thinking straight) :D
It might explain why TS has/had such difficulty to begin with in setting up a lazarus 64-bit dev environment.
In principle you need to do two simple things (or actually 1 if you only wish to target win 64-bit).
- Download and install lazarus-1.6.0-fpc-3.0.0-win64.exe
- In case want to cross-compile to win32, download and install lazarus-1.6.0-fpc-3.0.0-cross-i386-win32-win64.exe
Done :)
Would be interesting to know from TS what is not working when done so.
Thaddy:
With permission of TS this thread should be removed altogether. If it shows up in any searches we have to "support" this kind of erronial information forever.
Navigation
[0] Message Index
[#] Next page