d-mozulyov / Tiny.Library

General purpose low level library for Delphi 7-XE10, FreePascal and C++Builder
MIT License
81 stars 18 forks source link

[dcc32 Error] Tiny.Invoke.pas(1971): E2045 Bad object file format: '...\Tiny.Rtti\objs\win32\tiny.invoke.intrjumps.o' #2

Closed edwinyzh closed 4 years ago

edwinyzh commented 4 years ago

Hello,

I'm amazed by the benchmark result, and I tried to create a VCL test program by copying code from the FMX version the invoke demo, and got the following compiler error:

[dcc32 Error] Tiny.Invoke.pas(1971): E2045 Bad object file format: 'F:\Delphi_Libs_Tools\Tiny.Rtti\objs\win32\tiny.invoke.intrjumps.o' [dcc32 Fatal Error] Tiny.Invoke.pas(1971): E2226 Compilation terminated; too many errors

The compiler is Delphi XE$. Any advise ?

d-mozulyov commented 4 years ago

Hello, Edwin

I tested the code under XE8, including under VCL. What version of compiler do you have? Is the error repeated under x64? Is it repeated under FMX?

edwinyzh commented 4 years ago

The error was produced when compiling it under xe4 32bit, but it can be compiled and run successfully for the 64bit windows target.

d-mozulyov commented 4 years ago

Please replace this code (Tiny.Invoke.pas):

{$if not Defined(FPC) and (CompilerVersion <= 22)}
  {$define OLDDELPHI}
{$ifend}

with this:

{$if not Defined(FPC) and Defined(CPUX86) and (CompilerVersion <= 25)}
  {$define OLDDELPHI}
{$ifend}
d-mozulyov commented 4 years ago

@edwinyzh

Does that help?

d-mozulyov commented 4 years ago

done