Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[paho-dev] ld cannot find lpaho-mqtt3c

Hi, 

I have trouble compiling a file while linking it to the paho.mqtt.c library. I run gcc -o file file.c -lpaho-mqtt3c  -I src -lpthread -L build/output to compile it, but get a /usr/bin/ld cannot find lpaho-mqtt3c error.

Here is the output from the make install of the library, which shows the symlink has been created, so the problem does not come from that :

mkdir -p build/output/samples
mkdir -p build/output/test
echo OSTYPE is Linux
OSTYPE is Linux
install -m 644  build/output/libpaho-mqtt3c.so.1.0 /usr/local/lib
install -m 644  build/output/libpaho-mqtt3cs.so.1.0 /usr/local/lib
install -m 644  build/output/libpaho-mqtt3a.so.1.0 /usr/local/lib
install -m 644  build/output/libpaho-mqtt3as.so.1.0 /usr/local/lib
install  build/output/MQTTVersion /usr/local/bin
/sbin/ldconfig /usr/local/lib
ln -s libpaho-mqtt3c.so.1 /usr/local/lib/libpaho-mqtt3c.so
ln -s libpaho-mqtt3cs.so.1 /usr/local/lib/libpaho-mqtt3cs.so
ln -s libpaho-mqtt3a.so.1 /usr/local/lib/libpaho-mqtt3a.so
ln -s libpaho-mqtt3as.so.1 /usr/local/lib/libpaho-mqtt3as.so
install -m 644 src/MQTTAsync.h /usr/local/include
install -m 644 src/MQTTClient.h /usr/local/include
install -m 644 src/MQTTClientPersistence.h /usr/local/include

I searched for similar issues already, but none of the solutions given seem to work here. I am working on a computer running CentOS 6.4. What bugs me the most about this is that I already successfully installed and used this library previously on another computer, also running CentOS 6.

Thanks for any help


Back to the top