Lib Path

Linux specific questions.
Post Reply
Dinosaur
Posts: 1496
Joined: Jul 24, 2005 1:13
Location: Hervey Bay (.au)

Lib Path

Post by Dinosaur »

Hi All

Installing mosquitto on another Rpi Zero (but the 32 bit version with No Wifi)
and striking a "cannot find -lmosquitto: no such file or directory"

When I installed mosquitto, it placed the Link mosquitto.so.1 and the library mosquitto.so.2.0.11 in /usr/lib/arm-linux-gnueabihf.
That is the only place they are present.

So I #inclib "mosquitto"
and in the command line compile statement -p /usr/lib/arm-linux-gnueabihf as the path.
All to no avail.
So simply placed both .so in /usr/lib where other libraries are found by the linker.(for example librpigpio.so)
Again same error.(although doing that i assume link would no longer be valid)

The same installation on a 64 bit Rpi Zero 2 W has the same directory structure for the libraries.
With that install I only have a simple "#inclib mosquitto" and all is well.
So, I am at a loss as to why I have this problem.

Any suggestions would be greatly appreciated.

Regards
srvaldez
Posts: 3425
Joined: Sep 25, 2005 21:54

Re: Lib Path

Post by srvaldez »

Hi Dinosaur :)
it didn't occur to me until just now, if you haven't solved it already then try executing the ldconfig command, executing ldconfig without any options quite often fixes such problems
Dinosaur
Posts: 1496
Joined: Jul 24, 2005 1:13
Location: Hervey Bay (.au)

Re: Lib Path

Post by Dinosaur »

Hi All

Thanks for the reply srvaldez, no it's not resolved yet (other priorities) but I am travelling atm
so will respond when tested.
dbickin
Posts: 60
Joined: Aug 03, 2005 16:40

Re: Lib Path

Post by dbickin »

Dinosaur wrote: Jun 13, 2024 10:27 When I installed mosquitto, it placed the Link mosquitto.so.1 and the library mosquitto.so.2.0.11 in /usr/lib/arm-linux-gnueabihf.
That is the only place they are present.

So I #inclib "mosquitto"
and in the command line compile statement -p /usr/lib/arm-linux-gnueabihf as the path.
All to no avail.
Shouldn't the filename be "libmosquitto.so"?

I thought @inclib automagically prepended the "lib" in front of the name given.

David
Post Reply