Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
6 years, 7 months ago.
mbed-os version conflicts with included libraries
Hello,
as a rather mbed-newby I have played around with exporting programs to an external IDE (Visual Code, Ubuntu, GNU Arm Embedded Toolchain).
After fixing some issues with the exported configuration (settings.json, tasks.json), my "Hello World" samples worked fine.
When including existing libraies (e.g. MQTT - https://os.mbed.com/teams/mqtt/code/MQTT/) the compiler fails due to missing includes (e.g. TCPSocketConnection.h - https://os.mbed.com/users/mbed_official/code/Socket/docs/434906b5b977/TCPSocketConnection_8h_source.html)
It seems that TCPSocketConnection has been removed in mbed-os version 5. Is this an issue specific to this library (MQTT). Or did I missed some settings while exporting the programm (compiling within the online IDE works fine).
Thx, Thomas
1 Answer
6 years, 7 months ago.
The MQTT library was written based on Mbed 2 and there are some differences in networking between Mbed 2 and Mbed OS 5. This blog post notes how to get MQTT started for Mbed OS5. https://os.mbed.com/blog/entry/Using-HTTP-HTTPS-MQTT-and-CoAP-from-mbed/
Thanks for the details about exporting from online and offline. We'll take a look into this.
some additional information
mbed commands
the mbed-cli export command generates a valid Visual Code configuraiton (the online-compiler exports an invalid one)
adopted main.cpp
compiler output
Which version of mbed-os are you using?
posted by the other jimmy 18 Sep 2017