Thank you for the explanation.  I didn't really understand how to use the cross 
compiler.    

I have installed the cross compiler and tried to compile my program with 

ppcrossx64 program.pas

but I get
PaStep.pas(3,98) Fatal: Can't find unit smtpsend used by PAStep

Smtpsend is part of synapse...   I was going to try to copy the library to the 
x86_64-win64 folder but then I thought, wait a minute, I will need the 64bit 
library to get this to work...  but it looks to me like Synapse has only 
support for Win32.  So maybe I'm out of luck with a 64bit version if I'm going 
to use Synapse, unless the cross compiler will take care of this for me?  
Anyone know about this?   

I'm not sure I really need to compile a 64bit version for any reason, it's just 
I don't plan to ever run the program on a 32bit machine, so I'm thinking if I 
have a 64bit machine I might as well have a 64bit program as well and thought 
it might offer a performance advantage.

James

-----Original Message-----
From: fpc-pascal [mailto:fpc-pascal-boun...@lists.freepascal.org] On Behalf Of 
Nikolay Nikolov
Sent: Thursday, May 18, 2017 7:39 PM
To: fpc-pascal@lists.freepascal.org
Subject: Re: [fpc-pascal] FPC 64bit for windows



On 05/15/2017 02:41 PM, Graeme Geldenhuys wrote:
> On 2017-05-15 11:59, James Richters wrote:
>> When I try to install 64 bit windows
>> version, I don't have this anymore
>
> The Free Pascal project, for some weird reason, only ships a 64-bit 
> Windows cross-compiler. So you need both the 32-bit and 64-bit 
> installs. I don't know why they do this.
Is there an _actual_ problem with that, or is it only imaginary? The
32-to-64 crosscompiler works perfectly fine and has no known disadvantages. On 
the other hand, the 64-bit compiler cannot crosscompile 32-bit fpc, because it 
doesn't support the 80-bit extended float type, which is only supported by the 
x87 FPU, but not by SSE. So, basically, if you're a FPC compiler developer and 
you're using windows as your main platform, the 64-bit native fpc is inferior. 
And I don't think anyone has a problem running a 32-bit hosted compiler on a 
64-bit windows OS - there are simply no known issues with that under any 64-bit 
windows version that I know of.
>
> Simply compile your own _full_ 64-bit FPC, by installing a previous or 
> current stable 32-bit release. Download the latest stable release 
> source code. And then build a new 64-bit target compiler and tools.
Or, alternatively, you can simply install the 32-bit to 64-bit crosscompiler on 
top of your already working install and then crosscompile from the commandline 
with:

  ppcrossx64 program.pas

without any need to compile fpc from sources. It won't work from the IDE, 
though, but compiling your program from the command line, when you want to 
build a 64-bit .exe shouldn't be hard.

Of course, there's no problem in following Graeme's route and compiling the 
compiler yourself (and it might be helpful in the long run to learn how to 
compile the compiler), but installing the already packaged
32-to-64 crosscompiler package might be easier to start with.
>
> It might sound complicate, but the process is pretty easy. Here is a 
> batch file I normally use to do this for me.
>
>
> ...
>
> But again, I don't know why the FPC team doesn't make an official full 
> 64-bit Windows release??
Because it is inferior, since it cannot build a 32-bit FPC. Imagine your advice 
for compiling the 64-bit native compiler, using the 32-bit starting compiler. 
What would happen if you had to go the other way around? Your advice only 
works, because the 32-bit compiler can compile both the 32-bit and 64-bit 
version of FPC. If you were to start with the 64-bit version, it won't be able 
to compile the 32-bit version (under windows, that is; under linux, it works, 
because 64-bit linux has abi support for the 80-bit extended x87 fpu type and 
there we usually ship a native 64-bit compiler). It may not matter for you, but 
is a huge showstopper for any FPC compiler developer that uses Windows.

Nikolay
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org 
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to