1 year ago. This question has been closed. Reason: Duplicate question
How to export libraries for Eclipse?
Note: IT WAS FAILING BECAUSE I DIDN'T HAVE MERCURIAL INSTALLED BEFORE IMPORTING THE PROJECT
SOLUTION: install Mercurial. Delete project. Restart Eclipse. Reimport project. Works.
MBED Guys: Add Install Mercurial to the Eclipse instructions. Found the hint on http://blog.janjongboom.com/2016/04/06/offline-dev-debugging.html
I was able to export my mbed project for eclipse. Projects with no library dependencies work. It seems the project export does not include the required libraries. (Why?) There is a .lib file but the compiler complains it can't find the .h file. Is this because the library is private? The .lib just has a link. But the makefile doesn't seem to reference it. Should it? Do I have to separately export the libraries and save them to the file? I did this and the compiler gets a little further
at least it finds the library .h file, but then it seems it is not including the library .cpp file.
I am not an expert with the makefiles.
How do I need to modify the makefile to get it to use the library .cpp file?
Looking at nrf52 example I found: SRC_FILES += \ $(SDK_ROOT)/modules/nrfx/mdk/gcc_startup_nrf52.S \ $(SDK_ROOT)/components/libraries/experimental_log/src/nrf_log_backend_rtt.c \ $(SDK_ROOT)/components/libraries/experimental_log/src/nrf_log_backend_serial.c \ $(SDK_ROOT)/components/libraries/experimental_log/src/nrf_log_backend_uart.c \ ...
So I tried adding to the makefile
SRC_FILES += \ <mylibrary>.cpp
My library is in the project directory.
But this does not work. Any ideas? This seems like it should be a pretty common thing to have to do.