11 Replies Latest reply on Jul 15, 2015 1:55 AM by nicesw123

    gcc hello.cpp on yocto galileo error (paho embedded c)


      Greetings everyone,


      I am trying to use paho embedded c client for some tests, it comes with a few examples

      and always that i try to compile one of the examples it doesnt work,


      root@clanton:~/org.eclipse.paho.mqtt.embedded-c-1.0.0# ls

      CONTRIBUTING.md  MQTTClient       MQTTPacket       README.md        build            epl-v10

      Debug            MQTTClient-C     Makefile         about.html       edl-v10          notice.html

      root@clanton:~/org.eclipse.paho.mqtt.embedded-c-1.0.0# cd MQTTClient

      root@clanton:~/org.eclipse.paho.mqtt.embedded-c-1.0.0/MQTTClient# ls

      samples  src

      root@clanton:~/org.eclipse.paho.mqtt.embedded-c-1.0.0/MQTTClient# cd samples

      root@clanton:~/org.eclipse.paho.mqtt.embedded-c-1.0.0/MQTTClient/samples# ls

      arduino  linux

      <paho.mqtt.embedded-c-1.0.0/MQTTClient/samples# cd linux                    

      <ho.mqtt.embedded-c-1.0.0/MQTTClient/samples/linux# ls

      build.sh       hello          hello.cpp      main.cpp       stdoutsub      stdoutsub.cpp

      <ho.mqtt.embedded-c-1.0.0/MQTTClient/samples/linux# gcc hello.cpp

      hello.cpp:3:24: fatal error: MQTTClient.h: No such file or directory

      compilation terminated.




      Please somoeone knows what is going one?


      Also once i have downloaded on board and try to make install on the directory this is the error:


      root@clanton:~/org.eclipse.paho.mqtt.embedded-c-1.0.0# make install

      mkdir -p build/output/samples

      mkdir -p build/output/test

      cc -o build/output/samples/pub0sub1 MQTTPacket/src/../samples/pub0sub1.c -lpaho-embed-mqtt3c -I MQTTPacket/src  -L build/output

      /tmp/ccXBtQ5l.o: In function `main':

      pub0sub1.c:(.text+0x157): undefined reference to `transport_open'

      pub0sub1.c:(.text+0x214): undefined reference to `transport_sendPacketBuffer'

      pub0sub1.c:(.text+0x223): undefined reference to `transport_getdata'

      pub0sub1.c:(.text+0x30d): undefined reference to `transport_sendPacketBuffer'

      pub0sub1.c:(.text+0x31c): undefined reference to `transport_getdata'

      pub0sub1.c:(.text+0x3b1): undefined reference to `transport_getdata'

      pub0sub1.c:(.text+0x4d9): undefined reference to `transport_sendPacketBuffer'

      pub0sub1.c:(.text+0x539): undefined reference to `transport_sendPacketBuffer'

      pub0sub1.c:(.text+0x552): undefined reference to `transport_close'

      collect2: error: ld returned 1 exit status

      make: *** [build/output/samples/pub0sub1] Error 1


      I am new to all of this if anyone can help i am very grateful, thanks!