I am trying to make the transtition from MBED Studio to VSCode.
I have succesfully compiled and debugged the Blinky example.
I now want to create a large project with many subdirectories.
When I create a new library, and include it’s header in the main.cpp, and try building using MBED CLI2 I get:
myLibrary.hpp: No such file or directory.
Compilation terminated.
Perhaps I have misunderstood the functionality of MBED CLI2, but I thought that it could behave like MBED Studio and could build a project, afterwhich convert it to a CMAKE-build.
CLI2 is cmake based, and it has not the automatic scanning feature. This was useful, but when Mbed grown so much, the scan and compile times have grown also very much. And adding libraries was fiddling with excluding unwanted files.
With cmake it is reverse, you have too add the sources to a target file by file. You can add files that belong only to this project in a src dir like this:
Thank you very much for your reply. Looks like I will have to embrace CMake.
Would you mind posting a link to an example project that uses CMake to wrap my head around it?