Lazarus

Free Pascal => Windows => Topic started by: alfware17 on November 08, 2018, 07:05:14 pm

Title: Free Pascal IDE how to use 64bit Compiler
Post by: alfware17 on November 08, 2018, 07:05:14 pm
Hallo,
I thought I would never in my live ask that question because I am rather fan of 16 bit (and 32  ::) )
But where can I call the 64bit compiler from the Free Pascal IDE?! :-*
I installed the Cross Compiler 64bit (3.0.4) for Windows and can call it at command line.
The program works fine, maybe have to do some modifications I dont see by now.
But in the IDE?   "Options, Compile" - "Compile, target" (only Win32 options)  I didnt find.
Who can help. thanks.
Title: Re: Free Pascal IDE how to use 64bit Compiler
Post by: ASBzone on November 08, 2018, 07:49:50 pm
I don't know the answer to that question if you're not using Lazarus as your IDE.

In Lazarus, from the menu, select the following:

Project --> Project Options --> Compiler Options --> Config and Target

Title: Re: Free Pascal IDE how to use 64bit Compiler
Post by: lucamar on November 08, 2018, 08:38:37 pm
The fp IDE uses its own internal compiler, not the installed command-line one, so it doesn't matter whether you install a cross-compiler.

If anything, you may try building a 64-bit IDE with it, but note that I'm not sure if it can be done. It it can be, it would be nice if you told us ;D

Best of lucks.
Title: Re: Free Pascal IDE how to use 64bit Compiler
Post by: Thaddy on November 09, 2018, 06:35:03 am
The fp IDE uses its own internal compiler, not the installed command-line one, so it doesn't matter whether you install a cross-compiler.

If anything, you may try building a 64-bit IDE with it, but note that I'm not sure if it can be done. It it can be, it would be nice if you told us ;D

Best of lucks.
Yes that can be done. I am actually always using it both on Linux 64 and Windows 10 64.
Simply:
Code: Bash  [Select][+][-]
  1. make clean all install OS_TARGET=win64 CPU_TARGET=x86_64 IDE=1 GDBMI=1 PP=\the\path\to\bootstrap\ppcx64.exe
Given a 64 bit starting compiler or a 32 bit cross-compiler for win64 this will usually do the trick. The above compiles a full 64 bit FPC including a 64 bit textmode IDE fp.exe.
On Linux64 just change OS_TARGET=linux, change ppcx64.exe to just ppcx64 (and use a linux path /).
I am not quite sure if IDE=1 is actually still necessary, but it used to be and it doesn't harm to leave it in. This is a very old tried and tested recipe.
GDBMI=1 is the default in 3.2.0 so may also not be necessary. It requires a recent GDB, though. Higher than GDB 7.2. If for some reason you must use an older GDB, leave it out.

You can even build a 32 bit IDE that targets x86_64 (e.g. make crossall crossinstall IDE=1 PP=\a\32\bit\ppcrossx64) but it has been a long time ago I built such a beast. Not recommended.
Title: Re: Free Pascal IDE how to use 64bit Compiler
Post by: alfware17 on November 09, 2018, 02:44:54 pm
Hey Thaddy,
I never built my own IDE ::)
But when it helps... Please tell me, where must I do (tried just the installed ..\bin\x86_64-win directory where I found the ppcx64.exe)
I got a message "no rule to make target 'clean' "
I do need the sources?! :) I guess you mean that by GDB?
I was just wondering why there wasn't any 64bit IDE for that. Nobody needs? I can compile my program with batch fpc, no problem.
I have no special code or functions I need the help of the IDE with, I only wanted to make effort of my ful computers memory with
compile 64bit because under 32bit the heap is smaller and then my program starts divide and rule ;D
TinyPortal © 2005-2018