[Lazarus] /usr/bin/ld: cannot find -lwhatever

Giuliano Colla giuliano.colla at fastwebnet.it
Sun Feb 21 15:46:37 CET 2016


Hi,

I'm need to link some C modules to a Lazarus app.

I started with just a minimal console app, and one module, I've created 
with h2pas the binding module, and edited to make it compile properly, 
but when it comes to link I get the "cannot find" error.

I tried both a mymodule.o object and a mymodule.so shared object.

I tried putting the .o/.so in the source directory, in the unit 
directory, and in /usr/lib64 directory (with an ldconfig to update ld 
cache).

I tried declaring the external library just with the module name, and 
with the full path.

I tried adding the path where the .o/.so file is located in the -Fl path 
of the Compiler Options.

The result is always the same: cannot find -lwhatever, with "whatever" 
reflecting exactly my external library path/name.

I'm at loss. What I'm missing?

Giuliano






More information about the Lazarus mailing list