尝试编译示例之一时出现以下错误:
main.cpp:8:undefined reference to `mosqpp::lib_init()'
main.cpp:13: undefined reference to `mosqpp::mosquittopp::loop(int, int)'
main.cpp:15: undefined reference to `mosqpp::mosquittopp::reconnect()'
temperature_conversion.o: In function `mqtt_tempconv':
temperature_conversion.cpp:7: undefined reference to `mosqpp::mosquittopp::mosquittopp(char const*, bool)'
temperature_conversion.cpp:13: undefined reference to `mosqpp::mosquittopp::connect(char const*, int, int)'
temperature_conversion.cpp:7: undefined reference to `mosqpp::mosquittopp::~mosquittopp()'
temperature_conversion.o: In function `mqtt_tempconv::on_connect(int)':
temperature_conversion.cpp:21: undefined reference to `mosqpp::mosquittopp::subscribe(int*, char const*, int)'
temperature_conversion.o: In function `mqtt_tempconv::on_message(mosquitto_message const*)':
temperature_conversion.cpp:37: undefined reference to `mosqpp::mosquittopp::publish(int*, char const*, int, void const*, int, bool)'
请帮忙