LINUX 系统搭建MQTT paho-mqtt.C工程问题

LINUX 系统搭建MQTT paho-mqtt.C工程问题,搞这方面的朋友可以一起交流一下

工程编译参考:https://blog.csdn.net/jn152/article/details/89605624

koisi@cyan:~/paho.mqtt.c/target_lib (master*%=) % sudo make
[ 14%] Built target common_obj
[ 15%] Built target paho-mqtt3a
[ 30%] Built target common_obj_static
[ 31%] Built target paho-mqtt3c-static
[ 32%] Built target paho-mqtt3c
[ 34%] Built target MQTTVersion
[ 36%] Built target paho-mqtt3a-static
[ 37%] Built target MQTTAsync_publish
[ 38%] Built target MQTTClient_subscribe
[ 40%] Built target paho_cs_sub_static
[ 41%] Linking C executable paho_cs_pub_static
[ 42%] Built target paho_cs_pub_static
Scanning dependencies of target paho_cs_sub
[ 42%] Building C object src/samples/CMakeFiles/paho_cs_sub.dir/paho_cs_sub.c.o
[ 43%] Building C object src/samples/CMakeFiles/paho_cs_sub.dir/pubsub_opts.c.o
[ 44%] Linking C executable paho_cs_sub
[ 44%] Built target paho_cs_sub
Scanning dependencies of target paho_cs_pub
[ 45%] Building C object src/samples/CMakeFiles/paho_cs_pub.dir/paho_cs_pub.c.o
[ 45%] Building C object src/samples/CMakeFiles/paho_cs_pub.dir/pubsub_opts.c.o
[ 46%] Linking C executable paho_cs_pub
[ 46%] Built target paho_cs_pub
Scanning dependencies of target paho_c_pub
[ 47%] Building C object src/samples/CMakeFiles/paho_c_pub.dir/paho_c_pub.c.o
[ 48%] Building C object src/samples/CMakeFiles/paho_c_pub.dir/pubsub_opts.c.o
[ 48%] Linking C executable paho_c_pub
[ 48%] Built target paho_c_pub
Scanning dependencies of target paho_c_sub
[ 49%] Building C object src/samples/CMakeFiles/paho_c_sub.dir/paho_c_sub.c.o
[ 49%] Building C object src/samples/CMakeFiles/paho_c_sub.dir/pubsub_opts.c.o
[ 50%] Linking C executable paho_c_sub
[ 50%] Built target paho_c_sub
Scanning dependencies of target MQTTAsync_subscribe
[ 51%] Building C object src/samples/CMakeFiles/MQTTAsync_subscribe.dir/MQTTAsync_subscribe.c.o
[ 51%] Linking C executable MQTTAsync_subscribe
[ 51%] Built target MQTTAsync_subscribe
Scanning dependencies of target MQTTClient_publish
[ 52%] Building C object src/samples/CMakeFiles/MQTTClient_publish.dir/MQTTClient_publish.c.o
[ 53%] Linking C executable MQTTClient_publish
[ 53%] Built target MQTTClient_publish
Scanning dependencies of target paho_c_sub_static
[ 54%] Building C object src/samples/CMakeFiles/paho_c_sub_static.dir/paho_c_sub.c.o
[ 54%] Building C object src/samples/CMakeFiles/paho_c_sub_static.dir/pubsub_opts.c.o
[ 55%] Linking C executable paho_c_sub_static
/usr/bin/ld: cannot find -lpaho-mqtt3as-static
collect2: error: ld returned 1 exit status
src/samples/CMakeFiles/paho_c_sub_static.dir/build.make:120: recipe for target ‘src/samples/paho_c_sub_static’ failed
make[2]: *** [src/samples/paho_c_sub_static] Error 1
CMakeFiles/Makefile2:835: recipe for target ‘src/samples/CMakeFiles/paho_c_sub_static.dir/all’ failed
make[1]: *** [src/samples/CMakeFiles/paho_c_sub_static.dir/all] Error 2
Makefile:162: recipe for target ‘all’ failed
make: *** [all] Error 2
koisi@cyan:~/paho.mqtt.c/target_lib (master*%=) % sudo make
[ 14%] Built target common_obj
[ 15%] Built target paho-mqtt3a
[ 30%] Built target common_obj_static
[ 31%] Built target paho-mqtt3c-static
[ 32%] Built target paho-mqtt3c
[ 34%] Built target MQTTVersion
[ 36%] Built target paho-mqtt3a-static
[ 37%] Built target MQTTAsync_publish
[ 38%] Built target MQTTClient_subscribe
[ 39%] Linking C executable paho_cs_sub_static
/usr/bin/ld: cannot find -lpaho-mqtt3cs-static
collect2: error: ld returned 1 exit status
src/samples/CMakeFiles/paho_cs_sub_static.dir/build.make:120: recipe for target ‘src/samples/paho_cs_sub_static’ failed
make[2]: *** [src/samples/paho_cs_sub_static] Error 1
CMakeFiles/Makefile2:539: recipe for target ‘src/samples/CMakeFiles/paho_cs_sub_static.dir/all’ failed
make[1]: *** [src/samples/CMakeFiles/paho_cs_sub_static.dir/all] Error 2
Makefile:162: recipe for target ‘all’ failed
make: *** [all] Error 2

你可能感兴趣的:(mqtt)