title: How to declare the Paho MQTT C++ in another c++ file?
body: <p>Below is my project structure,</p>
  
  <pre><code>root@user-VirtualBox:/home/user/octane_etk_sample-6.0.0.240# ls
  bin                 include   paho.mqtt.c    speedway_embedded_example.cpp
  cap                 lib       paho.mqtt.cpp  VERSION
  cap_description.in  Makefile  SCMREV
  </code></pre>
  
  <p>I have the paho.mqtt.cpp package inside the project directory i.e.,octane_etk_sample-6.0.0.240 and I have installed all the steps which is mentioned in <a href="https://github.com/eclipse/paho.mqtt.cpp" rel="nofollow noreferrer">https://github.com/eclipse/paho.mqtt.cpp</a>.</p>
  
  <p>Now, I have included the MQTTAsync header file in speedway_embedded_example.cpp as like below,</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  #include &lt;algorithm&gt;
  #include &lt;signal.h&gt;
  #include &lt;stdio.h&gt;
  #include &lt;cstdlib&gt;
  #include "ltkcpp.h"
  #include "impinj_ltkcpp.h"
  #include "time.h"
  
  
  #include "/home/user/octane_etk_sample-6.0.0.240/paho.mqtt.c/src/MQTTAsync.h"
  </code></pre>
  
  <p>After including the header file, I am trying to establish the MQTT client connection inside the public class, </p>
  
  <pre><code>void
  CMyApplication::printOneTagReportData (
    CTagReportData *              pTagReportData)
  {
     string address = "tcp://mqtt1.mindlogic.com:1883";
     cout &lt;&lt; "OK\n" &lt;&lt; address;
  
  
     mqtt::async_client cli(address, "", 120, "data-persist");
  }
  </code></pre>
  
  <p>When I try to make a speedway_embedded_example file, I am getting below error,</p>
  
  <pre><code>root@user-VirtualBox:/home/mindlogic/octane_etk_sample-6.0.0.240# make
  mkdir -p ./bin
  g++ \
      -m32 -Wno-write-strings \
      -Iinclude \
      speedway_embedded_example.cpp \
      -Llib -lltkcpp_x86 -lltkcppimpinj_x86 -lxml2_x86 \
      -L/usr/bin -ldl -lssl -lcrypto \
      -o bin/speedwayr_x86
  speedway_embedded_example.cpp: In member function ‘void CMyApplication::printOneTagReportData(LLRP::CTagReportData*)’:
  speedway_embedded_example.cpp:1650:4: error: ‘mqtt’ has not been declared
      mqtt::async_client cli(address, "", 120, "data-persist");
  </code></pre>
  
  <p>Will anyone help me out to establish a client connection in the above scenario? </p>