9 years, 4 months ago.

Shared library

Is it possible to have an actual shared library, where there is only one instance of the library, and changes made to the library affect all my projects using it? Or do I have to manually copy and paste the library into each project whenever I change the library?

Thanks.

2 Answers

9 years, 4 months ago.

You can import a published library (even if it is your own) in your programs. When you update the sourcecode of lib and push the update it becomes visible but it will not automatically replace the lib in existing programs that use it. You must first rightclick on the lib in a program and select ''update''. This is done to make sure existing code does not break when the lib changes or disappears altogether.. Note that this also applies to the mbed lib itself..

Accepted Answer
9 years, 4 months ago.

There's no need to manually copy/paste the library.
When a shared library changes (yours or from another user), you have an option to update your projects (one by one) to the latest revision. You only need to click on the library name in your project and the summary tab in the right pane will show you whether the library needs to be updated.