AsyncPro and 64bit
Asked Answered
Q

4

9

I am running Delphi XE8 and have the GetIt AsyncPro for VCL 1.0 installed. It works fine when I compile my application for 32 bit but fails for 64 bit. The failure is:

[dcc64 Error] OoMisc.pas(2771): E2065 Unsatisfied forward or external declaration: 'Trim'

When I open OoMisc.pas is see:

{$IFNDEF Win32}
function Trim(const S : string) : string;
{$ENDIF}

The Trim function does not seem to be defined. The unit does have SysUtils in its uses clause.

Quarto answered 10/7, 2015 at 20:10 Comment(0)
B
2

I bet that is a relic from Delphi 1 when Win32 was used to distinguish from Win16. You may safely remove those lines.

Bleary answered 10/7, 2015 at 20:22 Comment(1)
I tried removing the function definition but then I got a bunch more errors that didn't seem to be related. It must be something else. Has anyone been able to compile ASPRO with a 64 bit application?Quarto
V
6

AsyncPro supports only Win32 platform. It cannot be used as-is for Win64 bit.

It contains plenty of 32bit inline ASM code that would have to be replaced either by Pascal code or ported to 64bit ASM code. Besides that part there might be other incompatibilities with Win64 bit platform.

Converting 32-bit Delphi Applications to 64-bit Windows - Inline Assembly Code

If your application contains inline assembly (ASM) code, you need to examine the ASM code and make the following changes: Mixing of assembly statements with Pascal code is not supported in 64-bit applications. Replace assembly statements with either Pascal code or functions written completely in assembly.

Porting assembly code from IA-32 to Intel 64 cannot be done by simply copying the code. Consider the architecture specifics, such as the size of pointers and aligning. You may also want to consult the processor manual for new instructions. If you want to compile the same code for different architectures, use conditional defines. See Using Conditional Defines for Cross-Platform Code in "Using Inline Assembly Code."

RAD Studio supports Intel x86 through SSE4.2 and AMD 3dNow, and for x64, Intel/AMD through SSE4.2.

Using Inline Assembly Code


Update:

There is Win64 port of AsyncPro provided by Johan Bontes:

I have a version for Win64 on my Github: https://github.com/JBontes/AsyncPro

It compiles, but I have not been able to test it comprehensivly. Feel free to file an issue if you get stuck anywhere.

Vallonia answered 14/7, 2015 at 19:53 Comment(1)
Thanks for the lead on the 64 bit version. I'll give it a tryQuarto
B
2

I bet that is a relic from Delphi 1 when Win32 was used to distinguish from Win16. You may safely remove those lines.

Bleary answered 10/7, 2015 at 20:22 Comment(1)
I tried removing the function definition but then I got a bunch more errors that didn't seem to be related. It must be something else. Has anyone been able to compile ASPRO with a 64 bit application?Quarto
D
2

I converted AsyncPro to XE8 but it only supports Win32.

Dulcy answered 17/7, 2015 at 8:48 Comment(0)
C
0

OoMisc.pas had a Trim function, that was removed from the implementation part. However somebody forgot to remove it from the interface part. That didn't hurt for x32 because it was inside of the $IFNDEF. Win32 is not defined for x64, so the compiler will complain. The solution for this particular issue is to delete the following 3 lines that were intended for Delphi 1.0.

{$IFNDEF Win32}
function Trim(const S : string) : string;
{$ENDIF}

Of course that does not make AsyncPro compatible with x64 as there will be other issues.

Chuckle answered 20/7, 2015 at 8:4 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.