Re: [fpc-pascal] Operator not overloaded
Thomas Kurz via fpc-pascal schrieb am Fr., 24. Juni 2022, 15:33: > Thank you very much, declaring the operator within the record does indeed > solve the issue. > > Just to be sure in case I might need it some day: Does this mean, if I > need e.g. a comparison operator for a specialized TPair, I would declare a > record class helper and define the operator there? > No, because for helpers the same restrictions apply as they do for global operators. Regards, Sven > ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Operator not overloaded
Thank you very much, declaring the operator within the record does indeed solve the issue. Just to be sure in case I might need it some day: Does this mean, if I need e.g. a comparison operator for a specialized TPair, I would declare a record class helper and define the operator there? - Original Message - From: Sven Barth via fpc-pascal To: FPC-Pascal users discussions Sent: Friday, June 24, 2022, 10:43:55 Subject: [fpc-pascal] Operator not overloaded Thomas Kurz via fpc-pascal schrieb am Do., 23. Juni 2022, 19:45: > When compiling, I get this error: > pathfinding.pas(17,17) Error: Operator is not overloaded: "TTileSegment" = > "TTileSegment" > Which I don't understand -- because the "=" operator is defined in > tesstypes.pas. > Am I doing something wrong or is this behavior a bug? Global operator overloads need to be available at the time the generic is *declared*, not *specialized*. That is one of the reasons why advanced records were introduced. So you need to declare your operators as part of your record. Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Cross-compiler for ARM64 on Windows available?
On 2022-06-24 09:02, Wolfgang Hubert via fpc-pascal wrote: Hi Wolfgang, thank you for your thoughts and suggestions on this topic. Tomas Hajny wrote: I may be wrong, but I believe that the original poster meant that he was using a "regular" (32-bit) version of WinXP on x86 and wanted to cross-compile from there to aarch64-win64. Yes, you are right. I have a XP machine as well as Windows 10, both 32-bit and 64-bit. So one of these should be the host. But it must be a cross-compiler for the ARM64 target, since I cannot operate a ARM64 machine running Windows. It is not accessible to me. It is a bit like the hen/egg-problem. I am using fpc 3.2.2 on my XP machine (32-bit) successfully for building 32-bit and 64-bit DLLs for Windows x86/x64. My goal is to do the same for the ARM64 target. Now I think of porting my pascal code to C++, installing MS Visual Studio and compiling it there. I am not a compiler compiler and will not be able to finalize or test a cross-compiler before using it. I believe that we can help you with resolution with FPC if you're interested, it isn't that difficult after all. Building a trunk (main) compiler, rtl and packages is matter of several rather simple commands if you already have your FPC 3.2.2 installation, plus installation of an external package (LLVM). All of it rather feasible. Yes, you may possibly encounter some issues with the current port to this target (aarch64-win64), but I'm sure there are others willing to help with that part as well if you report such issues. Just let me/us know if you want to continue that way, I'm willing to provide more specific directions. Tomas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Cross-compiler for ARM64 on Windows available?
Travis Siegel via fpc-pascal schrieb am Do., 23. Juni 2022, 20:08: > There actually is a 64-bit version of xp, but it's not compatible with > very much. Apparently, it didn't have an emulator in it, so running > 32-bit software wasn't something it did by default. I never did figure > out if it could be made to run 32-bit software or not, I just gave up on > it, (more precisely, the person I installed it for gave up on it), > because everything they tried to install wouldn't work, because it > wasn't 64-bit. > Pierre's remark was about an XP running on Aarch64 (which definitely does not exist), not an x86_64 XP. Also assuming you mean the x86_64 version of XP and not the IA64 (Itanium) one then it could run 32-bit software without problems. In contrast to the 32-bit version it was essentially a Windows Server 2003. Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Operator not overloaded
Thomas Kurz via fpc-pascal schrieb am Do., 23. Juni 2022, 19:45: > When compiling, I get this error: > > pathfinding.pas(17,17) Error: Operator is not overloaded: "TTileSegment" = > "TTileSegment" > > Which I don't understand -- because the "=" operator is defined in > tesstypes.pas. > > Am I doing something wrong or is this behavior a bug? > Global operator overloads need to be available at the time the generic is *declared*, not *specialized*. That is one of the reasons why advanced records were introduced. So you need to declare your operators as part of your record. Regards, Sven > ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Cross-compiler for ARM64 on Windows available?
Hi all, thank you for your thoughts and suggestions on this topic. Tomas Hajny wrote: I may be wrong, but I believe that the original poster meant that he was using a "regular" (32-bit) version of WinXP on x86 and wanted to cross-compile from there to aarch64-win64. Yes, you are right. I have a XP machine as well as Windows 10, both 32-bit and 64-bit. So one of these should be the host. But it must be a cross-compiler for the ARM64 target, since I cannot operate a ARM64 machine running Windows. It is not accessible to me. It is a bit like the hen/egg-problem. I am using fpc 3.2.2 on my XP machine (32-bit) successfully for building 32-bit and 64-bit DLLs for Windows x86/x64. My goal is to do the same for the ARM64 target. Now I think of porting my pascal code to C++, installing MS Visual Studio and compiling it there. I am not a compiler compiler and will not be able to finalize or test a cross-compiler before using it. Best regards, Wolfgang ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal