Add a new library with .lib file

hi all,

I am new to Arduino and as I read the guide of Arduino - LibraryTutorial, it seems for all the library created, we need to provide .cpp and .h file, can we use .lib file directly?

Why do you want to do that? And where does that .lib file come from?

I may want to create a library but I don't want to share the code of it. I think most compiler support using a library(.lib/.a), so is it also supported in Arduino?

No, not really. There might be some way to get it to work, but the normal scheme is for everything to be source based (largely because of the many different CPU targets. avr-gcc comes with 17 copies of libc.a, just to cover the AVR varieties. And that’s JUST the AVRs…)

I know at least one person who will not have any problems reverse engineering your library. I have seen him do it.

Obscuring stuff is never a way to protect it.

And open source licenses might force you to deliver the source code on request anyway.

Looks like this feature is in the works:

There's a test build if you want to try it out.