Unable to make bianry file for Beagle Bone Black with mosquitto header file included.

15 vistas
Ir al primer mensaje no leído

milav...@teqdiligent.com

no leída,
30 mar 2017, 1:56:38 a.m.30/3/2017
para MQTT


Hello everyone..

I have face some problem regrading the mosquitto mqtt.

I downloaded the the mosquitto mqtt from apt-get mosquitto , mosquitto-client and libmosquitto-dev in host PC( linux ubuntu 14.04).

i make a simple publish and subscribe c client code which are run in Beagle Bone Black.

now i want to make binary file for beagle bone black of this code.

when i write a command ::

$arm-linux-gnueabihf-gcc mqtt_pub_sub.c -o mqtt_pub_sub

it gives the following error ..

mqtt_pub_sub.c:1:22: fatal error: mosquitto.h: No such file or directory
 #include<mosquitto.h>
                      ^
compilation terminated.

when i put mosquitto.h file in same folder the above error is solved... but gives another errors...like below...

/tmp/ccuGM6Zq.o: In function `main':
mqtt_pub_sub.c:(.text+0x40): undefined reference to `mosquitto_lib_init'
mqtt_pub_sub.c:(.text+0x4e): undefined reference to `mosquitto_new'
mqtt_pub_sub.c:(.text+0x7c): undefined reference to `mosquitto_username_pw_set'
mqtt_pub_sub.c:(.text+0x88): undefined reference to `mosquitto_connect'
mqtt_pub_sub.c:(.text+0x90): undefined reference to `mosquitto_strerror'
mqtt_pub_sub.c:(.text+0xbc): undefined reference to `mosquitto_publish'
mqtt_pub_sub.c:(.text+0xd2): undefined reference to `mosquitto_strerror'
mqtt_pub_sub.c:(.text+0xe8): undefined reference to `mosquitto_destroy'
mqtt_pub_sub.c:(.text+0xec): undefined reference to `mosquitto_lib_cleanup'
collect2: error: ld returned 1 exit status



where is the problem?

please give me a right way.....

Responder a todos
Responder al autor
Reenviar
0 mensajes nuevos