Forum > Beginners

Command line compilation to windows 64 bit target

(1/3) > >>

DenReq:
Hello,

Sorry for the probably basic questions, but I don't understand how to get a 64 bit windows build of an application with the command line compiler version. The installation binaries do seem to indicate that this target is taken into account, but the FPC compiler does not know it.

I have done, with some difficulty, a complete recompilation of the libraries and compiler, but the problem remains the same.

Is it possible to find somewhere a procedure explaining how to activate the compilation for a win64 target? I'm under the impression that everyone uses Lazarus rather than the command line version, do I really need to do the same (which would be a problem in my case)?

Thanks in advance for any help.

EDIT : I've made a bit of progress, so maybe I'll be able to figure it out on my own eventually. :)

440bx:

--- Quote from: DenReq on May 16, 2022, 10:39:21 am ---Is it possible to find somewhere a procedure explaining how to activate the compilation for a win64 target?

--- End quote ---
did you download/install the cross compiler ppcrossx64.exe ?  that's the version of the compiler that can produce a 64bit executable for Windows.

if you don't have that executable installed then you need to download/install it.

HTH.

marcov:
If you use the combined FPC 32+64-bit installer, try compiling with

fpc -Px86_64 -Twin64

The -P option selects a different compiler binary (ppcrossx64) and then the 64-bit options are available. The -Twin64 might not be necessary.

DenReq:
Thanks a lot for your replies, it seems to be better with your indications indeed.

I was able to recompile the RTL and the libraries in 32 bits. If I want to do the same thing in 64 bits, is there a procedure for that too, or do I have to modify the makefile myself?

marcov:

make all CPU_TARGET=x86_64  OS_TARGET=win64   

in the toplevel FPC sources directory.

Navigation

[0] Message Index

[#] Next page

Go to full version