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.

Dalija Prasnikar
  • 27,212
  • 44
  • 82
  • 159
Seti Net
  • 693
  • 1
  • 7
  • 24

4 Answers4

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.

Dalija Prasnikar
  • 27,212
  • 44
  • 82
  • 159
2

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

David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490
Uwe Raabe
  • 45,288
  • 3
  • 82
  • 130
  • 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? – Seti Net Jul 11 '15 at 13:39
2

I converted AsyncPro to XE8 but it only supports Win32.

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.

Sebastian Z
  • 4,520
  • 1
  • 15
  • 30