Link object file to a Delphi project that compiled by C++ builder XE5/XE6

915 Views Asked by At

I ve a C++ library. I build a static library with C++ builder XE6 for Win32, Win64 and OSX.

I link this static library from my delphi project.

{$if defined(WIN32)}
  {$L obj\testlib_win32.obj}
{$elseif defined(WIN64)}
  {$L obj\testlib_win64.o}
{$elseif defined(MACOS)}
  {$L obj\testlib_osx.a}
{$endif}

Compiling for Win32 and Win64 platforms are success. But when i try to compile the project with OSX, i got an compile error

[dccosx Error] test.pas (100): E2045 Bad object file format: 'test_osx.a'

C++ Builder creates ELF32 format object files. Can not delphi link ELF32 object format?

0

There are 0 best solutions below