X64 only - Can't determine which overloaded function to call
I have two almost identical programs, but one of them I cannot compile with Win64, but it works fine with Win32.
I finally figured out that the difference between the two that seemed to make a difference was the working one had constants defined, the one with issues, those constants were changed to variables.
I’ve managed to reduce it down to the offending line and made some test programs that demonstrate the issue:
This program runs fine with both Win32 and Win64:
This program will only compile with Win32. With Win 64 I get:
testit.pas(7,5) Error: Can't determine which overloaded function to call.
LY:=Round(30-(BYA+SYA)); //This is the line producing the error, but why?
I’m very confused by this. It’s very clear what to do, and as far as I know, valid syntax.
If I use
Then it is compiled by both Win32 and Win64 fine. But this is not what I always want to do, I have reasons to want it (30-(BYA+SYA)) the original formula was very long, I reduced it down to this one thing that causes the problem, I really need to be able to group things the way I want to group them.
Re: X64 only - Can't determine which overloaded function to call
>have you tried 30.0 as well? it looks like something needs a real number for this on the 64bit side...
I have just now tried 30.0 and it compiles and runs fine with x64.
I have also put the 30 back and changed the BYA and SYA variables to integers and it also works fine on x64.
I just stuck the 30 in there to demonstrate the problem, my original program has a function call where the 30 is that returns an integer.
I realize that there is no possible reason to want to round this with the variables supplied, the round was left over because I used to have a divide in the formula but ended up removing it but never removed the round() Still, I think this should compile successfully (useless as it is) anyway because there is technically nothing wrong with it.
I can do Round(30), and Round(BYA) (BYA is a byte variable) successfully in both Win32 and Win64, so I don't know why this particular combination is a problem.
I just now also tried
LY:=Round(-(BYA+SYA)+30); //works both Win32 and Win64
Which is exactly the same thing as
LY:=Round(30-(BYA+SYA)); //Does not work Win64
From: fpc-pascal [mailto:[hidden email]] On Behalf Of [hidden email] Sent: Thursday, June 15, 2017 2:03 PM
To: [hidden email] Subject: Re: [fpc-pascal] X64 only - Can't determine which overloaded function to call
On 06/15/2017 08:20 AM, James Richters wrote:
> Also compiles fine with both Win32 and Win64
have you tried 30.0 as well? it looks like something needs a real number for this on the 64bit side...