[Lazarus] Using a component OBJ file in Lazarus?

Bo Berglund bo.berglund at gmail.com
Sun Jun 10 12:37:32 CEST 2018


When converting components to Lazarus (see separate thread) I have
encountered a problem for a component that interfaces to a software
protection dongle.
My component files (pas) need to reference a unit + an obj file from
the dongle maker. In the maker's pas file is this:

IMPLEMENTATION
USES
   Windows;
{$L SPROMEPS.OBJ}  { LINK WITH THE SUPERPRO OBJECT FILE }

The Spromeps.obj file is located in the same directory as the source
files and in package manager I have added the main component source
file and checked that it compiles without errors. OK.
When the component source file was added PM asked if the path to the
file should be added to the search path, so I expected it to be
known...

But when I command PM to install the package and it asks to rebuild
Lazarus this happens:

Build IDE: Exit code 2, Errors: 1, Warnings: 2
lazarus.pp(161,1) Warning: Object SPROMEPS.OBJ not found, Linking may
fail !
lazarus.pp(161,1) Warning: Object SPROMEPS.OBJ not found, Linking may
fail !
lazarus.pp(161,1) Error: Can't open object file: SPROMEPS.OBJ

I tried to add the obj file to the files for the package but it did
not change anything.

I also tried Package/Options/Compiler options/Paths and added the path
to the component to Libraries

But it caused the same error on Lazarus rebuild...

So how do I tell Lazarus that this file is available?


-- 
Bo Berglund
Developer in Sweden



More information about the Lazarus mailing list