Skip to main content

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

Hello Nikhil,

I can't see you linking with -lpaho-mqtt3a neither with -lpaho-mqttpp.
Could you show us the Makefile of this PT-TRY?

Best regards,

2016-11-14 4:34 GMT-06:00 Nikhil Rote <nikhilrote05@xxxxxxxxx>:
> 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.
>
> _______________________________________________
> paho-dev mailing list
> paho-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from
> this list, visit
> https://dev.eclipse.org/mailman/listinfo/paho-dev



-- 
Guilherme Maciel Ferreira
Mobile Brazil: +55 48 9917 3969
Mobile México: +52 33 1968 6766
Site: http://guilhermemacielferreira.com/
Skype: guilherme.maciel.ferreira


Back to the top