5 years, 11 months ago.

Convert a program into a library?

I apologize in advance if this question has already been asked. I've tried to search for the answer, but have been unsuccessful.

I currently have a program I have written that really is three in one. I control the behavior via a settings header file with a handful of #defines in it. In retrospect, this was really silly.

So what I want to do now is delete main and convert my program to a library. Then my three other apps can just link to it. I've been poking around the mbed compiler page and haven't found anything really obvious yet.

Is this possible?

1 Answer

5 years, 11 months ago.

Make a new library, copy paste the code.

If it is already published you can change it in the admin settings of the repository.

I don't think it is possible to convert unpublished programs directly.

Thanks, Erik! I'll give that a try. Maybe I'll fork and then try, just in case.

posted by Dave M 08 Jan 2015