LNK1104 Visual studio 2015

倖福魔咒の 提交于 2020-01-05 04:06:12

问题


I am trying to build Caffe Deep Learning Network solution using Windows and I have literally tried everything to make it work.

I found similar questions, but they were using VS 2010 or 2013 and I don't have any of the options listed in most of the answers.

Firstly: I am using VS 2015, cudNN and latest Caffe, and I am trying to build it using Windows x64.

Secondly: I have tried two approaches (started off with adding cudNN path in both cases)

1) Reference: http://embedonix.com/articles/machine-learning/compiling-caffe-with-cuda-and-cudnn-support-on-windows-from-source/2/

I have used this command:

nuget restore Caffe.sln -PackagesDirectory ..\..\NugetPackages -ConfigFile nuget.config

then launched Visual Studio and tried to build the solution, but I get this error:

LNK1104 cannot open file 'libboost_date_time-vc140-mt-gd-1_59.lib'  classification  

2) I tried using this method:https://github.com/BVLC/caffe/tree/windows, which is from their oficial website.

But I am getting error: "The procedure entry point_CrtSetCheckCOunt could not be located in the dynamic link library... protoc.exe"

Does anyone have a solution of how to solve any of these issues,so I could install it?


回答1:


I am facing a simmilar issue. One of the libraries your code depends on does depend on boost.

Your code now also needs to import boost.

Luckily there are boost packages available via nuget. You need to recursibely manually check them all out until the errors are gone. The first one would be boost_date_time.

My packages file now looks like this:

  <packages>
    <package id="boost" version="1.63.0.0" targetFramework="native" />
    <package id="boost_atomic-vc140" version="1.63.0.0" targetFramework="native" />
    <package id="boost_chrono-vc140" version="1.63.0.0" targetFramework="native" />
    <package id="boost_date_time-vc140" version="1.63.0.0" targetFramework="native" />
    <package id="boost_filesystem-vc140" version="1.63.0.0" targetFramework="native" />
    <package id="googletest" version="1.8.0.0" targetFramework="native" />
  </packages>

This works because the project targets are now beeing extended and you get the path to the directory of the lib file as additional library directory added to the project.

The next error you may get now is LNK2019 and that would be connected to all or parts of the boost library beeing linked in dynamically in your dependency. The solution for me is different for the solution for you here - but I am sure there is a Caffe specific solution available.



来源:https://stackoverflow.com/questions/40351489/lnk1104-visual-studio-2015

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!