Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] Paho MQTT C++ client sample

I get the same errors too, after fixing up the Makefile to point to the right directories, using the latest source from the master branches of both.

The C library names have changed since those make files were written, I note.

Ian

On 18/06/14 12:20, Joerg Wende wrote:

Hi,

I've just tried to compile the samples of the Paho MQTT C++ client, but it
looks to me that the make file contains some hard coded references to other
projects:

user@ubuntu:~/git/org.eclipse.paho.mqtt.cpp/src/samples$ make
g++ -I.. -I/home/fmp/static/opensrc/mqtt/paho/org.eclipse.paho.mqtt.c/src
-D_NDEBUG -Wall -std=c++0x -O2 -o async_publish async_publish.cpp -L../lib
-L/home/fmp/static/opensrc/mqtt/paho/org.eclipse.paho.mqtt.c/src/linux_ia64
-lmqttpp -lmqttv3a
In file included from async_publish.cpp:23:0:
../mqtt/async_client.h:28:24: fatal error: MQTTAsync.h: Datei oder
Verzeichnis nicht gefunden
  #include "MQTTAsync.h"
                        ^
compilation terminated.
make: *** [async_publish] Fehler 1

After fixing the references make returns the following errors:

user@ubuntu:~/git/org.eclipse.paho.mqtt.cpp/src/samples$ make
g++ -I.. -I/home/user/git/include -D_NDEBUG -Wall -std=c++0x -O2 -o
async_publish async_publish.cpp -L../lib -L/home/user/git/lib -lmqttpp
-lpaho-mqtt3a
/tmp/cc63PFvQ.o: In Funktion `std::_Sp_counted_ptr_inplace<mqtt::message,
std::allocator<mqtt::message>, (__gnu_cxx::_Lock_policy)2>::_M_dispose()':
async_publish.cpp:(.text._ZNSt23_Sp_counted_ptr_inplaceIN4mqtt7messageESaIS1_ELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv
[_ZNSt23_Sp_counted_ptr_inplaceIN4mqtt7messageESaIS1_ELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv]+0xc):
 Nicht definierter Verweis auf `mqtt::message::~message()'
/tmp/cc63PFvQ.o: In Funktion `std::__shared_ptr<mqtt::message,
(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<mqtt::message>,
char const*&>(std::_Sp_make_shared_tag, std::allocator<mqtt::message>
const&, char const*&)':
async_publish.cpp:(.text._ZNSt12__shared_ptrIN4mqtt7messageELN9__gnu_cxx12_Lock_policyE2EEC2ISaIS1_EIRPKcEEESt19_Sp_make_shared_tagRKT_DpOT0_[_ZNSt12__shared_ptrIN4mqtt7messageELN9__gnu_cxx12_Lock_policyE2EEC5ISaIS1_EIRPKcEEESt19_Sp_make_shared_tagRKT_DpOT0_]+0x6a):
 Nicht definierter Verweis auf `mqtt::message::message(std::string const&)'
/tmp/cc63PFvQ.o: In Funktion `main':
async_publish.cpp:(.text.startup+0x179): Nicht definierter Verweis auf
`mqtt::async_client::async_client(std::string const&, std::string const&)'
async_publish.cpp:(.text.startup+0x195): Nicht definierter Verweis auf
`mqtt::async_client::set_callback(mqtt::callback&)'
async_publish.cpp:(.text.startup+0x1a7): Nicht definierter Verweis auf
`mqtt::async_client::connect()'
async_publish.cpp:(.text.startup+0x289): Nicht definierter Verweis auf
`mqtt::async_client::publish(std::string const&,
std::shared_ptr<mqtt::message>)'
async_publish.cpp:(.text.startup+0x340): Nicht definierter Verweis auf
`mqtt::async_client::publish(std::string const&, void const*, unsigned int,
int, bool)'
async_publish.cpp:(.text.startup+0x46f): Nicht definierter Verweis auf
`mqtt::async_client::publish(std::string const&,
std::shared_ptr<mqtt::message>, void*, mqtt::iaction_listener&)'
async_publish.cpp:(.text.startup+0x5e1): Nicht definierter Verweis auf
`mqtt::async_client::publish(std::string const&,
std::shared_ptr<mqtt::message>, void*, mqtt::iaction_listener&)'
async_publish.cpp:(.text.startup+0x65b): Nicht definierter Verweis auf
`mqtt::async_client::get_pending_delivery_tokens() const'
async_publish.cpp:(.text.startup+0x777): Nicht definierter Verweis auf
`mqtt::async_client::~async_client()'
async_publish.cpp:(.text.startup+0x79b): Nicht definierter Verweis auf
`mqtt::async_client::~async_client()'
collect2: error: ld returned 1 exit status
make: *** [async_publish] Fehler 1

Any guess ?

Thanks
J.

Mit freundlichen Grüßen / Kind regards

Joerg Wende

Leading Technical Sales Professional
Certified Consult. IT Specialist / Business Integration
IBM Sales & Distribution, Software Sales
http://www-01.ibm.com/software/websphere/
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
 Phone:            +49-351-4974-429         IBM Deutschland                    (Embedded 
                                                                             image moved 
                                                                                to file: 
                                                                           pic10428.gif) 
                                                                                         
 Mobile:           +49-171-2229636          Freiberger Str.35                            
                                                                                         
 E-Mail:           jwende@xxxxxxxxxx        1067 Dresden                                 
                                                                                         
                                            Germany                                      
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
 IBM Deutschland                                                                         
 GmbH /                                                                                  
 Vorsitzender des                                                                        
 Aufsichtsrats:                                                                          
 Martin Jetter                                                                           
 Geschäftsführung:                                                                       
 Martina Koederitz                                                                       
 (Vorsitzende),                                                                          
 Reinhard Reschke,                                                                       
 Dieter Scholz,                                                                          
 Gregor Pillen,                                                                          
 Christian Noll,                                                                         
 Ivo Koerner                                                                             
 Sitz der                                                                                
 Gesellschaft:                                                                           
 Ehningen /                                                                              
 Registergericht:                                                                        
 Amtsgericht                                                                             
 Stuttgart, HRB                                                                          
 14562 /                                                                                 
 WEEE-Reg.-Nr. DE                                                                        
 99369940                                                                                
                                                                                         


_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/paho-dev


Back to the top