Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[paho-dev] Error to running paho mqtt c++ project.

hi dev,
      Can you please guide me to run pahoo mqtt cpp project. i have lots of error message as follows:

16:03:47 **** Build of configuration Debug for project PT-TRY ****
make all
Building file: ../PT-try.cpp
Invoking: Cross G++ Compiler
g++ -std=c++0x -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"PT-try.d" -MT"PT-try.d" -o "PT-try.o" "../PT-try.cpp"
Finished building: ../PT-try.cpp
 
Building target: PT-TRY
Invoking: Cross G++ Linker
g++ -L"/home/prashant/New/PT-TRY/lib" -o "PT-TRY"  ./PT-try.o  
./PT-try.o: In function `main':
/home/prashant/New/PT-TRY/Debug/../PT-try.cpp:140: undefined reference to `mqtt::client::client(std::string const&, std::string const&, mqtt::iclient_persistence*)'
/home/prashant/New/PT-TRY/Debug/../PT-try.cpp:143: undefined reference to `mqtt::client::set_callback(mqtt::callback&)'
/home/prashant/New/PT-TRY/Debug/../PT-try.cpp:151: undefined reference to `mqtt::client::connect(mqtt::connect_options)'
/home/prashant/New/PT-TRY/Debug/../PT-try.cpp:159: undefined reference to `mqtt::client::publish(std::string const&, std::shared_ptr<mqtt::message>)'
/home/prashant/New/PT-TRY/Debug/../PT-try.cpp:165: undefined reference to `mqtt::client::publish(std::string const&, void const*, unsigned long, int, bool)'
/home/prashant/New/PT-TRY/Debug/../PT-try.cpp:173: undefined reference to `mqtt::client::publish(std::string const&, std::shared_ptr<mqtt::message>)'
/home/prashant/New/PT-TRY/Debug/../PT-try.cpp:178: undefined reference to `mqtt::client::disconnect()'
./PT-try.o: In function `mqtt::client::~client()':
/home/prashant/New/PT-TRY/Debug/../mqtt/client.h:45: undefined reference to `vtable for mqtt::client'
/home/prashant/New/PT-TRY/Debug/../mqtt/client.h:45: undefined reference to `mqtt::async_client::~async_client()'
./PT-try.o: In function `_ZN9__gnu_cxx13new_allocatorIN4mqtt7messageEE9constructIS2_IRKSsEEEvPT_DpOT0_':
/usr/include/c++/4.8/ext/new_allocator.h:120: undefined reference to `mqtt::message::message(std::string const&)'
./PT-try.o: In function `_ZN9__gnu_cxx13new_allocatorIN4mqtt7messageEE9constructIS2_IRPKcEEEvPT_DpOT0_':
/usr/include/c++/4.8/ext/new_allocator.h:120: undefined reference to `mqtt::message::message(std::string const&)'
./PT-try.o: In function `void __gnu_cxx::new_allocator<mqtt::message>::destroy<mqtt::message>(mqtt::message*)':
/usr/include/c++/4.8/ext/new_allocator.h:124: undefined reference to `mqtt::message::~message()'
collect2: error: ld returned 1 exit status
make: *** [PT-TRY] Error 1

16:03:48 Build Finished (took 1s.110ms)

Can you please help me resolve this issue.


--
Thanks and Regards,
Nikhil Rote.
+919890492412.

Back to the top