Caffe library: is it built as shared or static? (answer: both)
Hi, Because I could not find shared library declaration in caffe code. Now, does caffe support building a shared library?
Yes but actually compiles static as default
Caffe builds a shared (libcaffe.so) and static (libcaffe.a) library by default.
make
...
ls build/lib/
libcaffe.a libcaffe.so
Refer to the Makefile https://github.com/BVLC/caffe/blob/master/Makefile#L7-L10 for details.
@bhack no. See the Makefile.
@shelhamer Right this is the cmake PR/BRANCH behavior. It think that was the same derived by Makefile but probably behaviors are still not in sync between Cmake and Makefile
@bhack the library has been built both shared and static in master/dev as long as I can remember. If your answer does not relate to master/dev, please make that clear in your comment.
Otherwise it invites confusion. Thanks for helping answer questions, but please do be clear.
Hi, Sorry for not clear my question. In fact, the caffe now could be built in shared library in ubuntu, etc., but not in windows. To support shared library in windows demands a lot of modification in class declaration and a little modification in protoc compiler commands.