Use caffe as library (Windows, Visual Studio)

468 views
Skip to first unread message

Marianne

unread,
Aug 1, 2016, 10:19:42 AM8/1/16
to Caffe Users
I downloaded the current windows branch of caffe and used it successfully with the command line interface.
However, I would like to compile it as a library (static or dynamic) and use it in an other Visual Studio project. The aim here is to call routines to train, test and apply a net.

I'm pretty unsure how to correctly import the caffe library to my own Visual Studio project and how to handle the dependencies. If I add all dependencies like boost, glog etc. manually to my project, I'm at least able to compile it. As soon as I add any caffe-related code (e.g. "caffe::SolverParameter solver_param;"), I get linker errors (LNK2019).

Did anyone managed to use caffe as a library on Windows and could point me out the important steps?

Niklas Treutner

unread,
Aug 1, 2016, 3:29:11 PM8/1/16
to Caffe Users
Hi Marianne,

your Problem sounds familiar. I did the same steps as you (using VS 2013 and cmake) and included and linked all used libs manually. It took me some time but worked eventually.
These two sources helped me along the way:
http://blog.csdn.net/ws_20100/article/details/50499948 and http://dev.naver.com/projects/mydeeplearning/forum/94648

If you still have problems, please post the error-msgs and maybe i can help you (i'm still a beginner myself).
Reply all
Reply to author
Forward
0 new messages