Windows下caffe的配置和调用caffe库(二)

二、 Caffe库的调用:

  1. 新建空白项目,将配置管理器更改为x64运行方式。(release和Debug均可)。
  2. Debug配置:

    1)      包含目录:

Windows下caffe的配置和调用caffe库(二)

  1. D:\caffe-master\include;
  2. D:\NugetPackages\glog.0.3.3.0\build\native\include;
  3. D:\NugetPackages\OpenBLAS.0.2.14.1\lib\native\include;
  4. D:\NugetPackages\OpenCV.2.4.10\build\native\include;
  5. D:\NugetPackages\boost.1.59.0.0\lib\native\include;
  6. D:\NugetPackages\gflags.2.1.2.1\build\native\include;
  7. D:\NugetPackages\hdf5-v120-complete.1.8.15.2\lib\native\include;
  8. D:\NugetPackages\LevelDB-vc120.1.2.0.0\build\native\include;
  9. D:\NugetPackages\lmdb-v120-clean.0.9.14.0\lib\native\include;
  10. D:\NugetPackages\protobuf-v120.2.6.1\build\native\include;

    2)      库目录:

Windows下caffe的配置和调用caffe库(二)

  1. D:\caffe-master\Build\x64\Debug;
  2. D:\NugetPackages\OpenCV.2.4.10\build\native\lib\x64\v120\Debug;
  3. D:\NugetPackages\boost_chrono-vc120.1.59.0.0\lib\native\address-model-64\lib;
  4. D:\NugetPackages\boost_date_time-vc120.1.59.0.0\lib\native\address-model-64\lib;
  5. D:\NugetPackages\boost_filesystem-vc120.1.59.0.0\lib\native\address-model-64\lib;
  6. D:\NugetPackages\boost_system-vc120.1.59.0.0\lib\native\address-model-64\lib;
  7. D:\NugetPackages\boost_thread-vc120.1.59.0.0\lib\native\address-model-64\lib;
  8. D:\NugetPackages\gflags.2.1.2.1\build\native\x64\v120\dynamic\Lib;
  9. D:\NugetPackages\glog.0.3.3.0\build\native\lib\x64\v120\Debug\dynamic;
  10. D:\NugetPackages\hdf5-v120-complete.1.8.15.2\lib\native\lib\x64;
  11. D:\NugetPackages\LevelDB-vc120.1.2.0.0\build\native\lib\x64\v120\Debug;
  12. D:\NugetPackages\lmdb-v120-clean.0.9.14.0\lib\native\lib\x64;
  13. D:\NugetPackages\OpenBLAS.0.2.14.1\lib\native\lib\x64;
  14. D:\NugetPackages\protobuf-v120.2.6.1\build\native\lib\x64\v120\Debug;
  15. D:\NugetPackages\boost_date_time-vc120.1.59.0.0\lib

    3)      链接器-->输入:

Windows下caffe的配置和调用caffe库(二)

caffe.lib

compute_image_mean.lib

convert_imageset.lib

convert_mnist_data.lib

libcaffe.lib

opencv_highgui2410d.lib

opencv_imgproc2410d.lib

opencv_objdetect2410d.lib

opencv_core2410d.lib

opencv_ml2410d.lib

libboost_date_time-vc120-mt-gd-1_59.lib

libboost_filesystem-vc120-mt-gd-1_59.lib

libboost_system-vc120-mt-gd-1_59.lib

libglog.lib

hdf5.lib

hdf5_cpp.lib

hdf5_f90cstub.lib

hdf5_fortran.lib

hdf5_hl.lib

hdf5_hl_cpp.lib

hdf5_hl_f90cstub.lib

hdf5_hl_fortran.lib

hdf5_tools.lib

szip.lib

zlib.lib

LevelDb.lib

lmdb.lib

libprotobuf.lib

libopenblas.dll.a

gflags_nothreadsd.lib

gflagsd.lib

  3.      release编译配置:

    1)      包含目录:

和上面Debug模式下配置相同:

Windows下caffe的配置和调用caffe库(二)

  1. D:\caffe-master\include
  2. D:\NugetPackages\boost.1.59.0.0\lib\native\include
  3. D:\NugetPackages\gflags.2.1.2.1\build\native\include
  4. D:\NugetPackages\glog.0.3.3.0\build\native\include
  5. D:\NugetPackages\hdf5-v120-complete.1.8.15.2\lib\native\include
  6. D:\NugetPackages\LevelDB-vc120.1.2.0.0\build\native\include
  7. D:\NugetPackages\lmdb-v120-clean.0.9.14.0\lib\native\include
  8. D:\NugetPackages\OpenBLAS.0.2.14.1\lib\native\include
  9. D:\NugetPackages\OpenCV.2.4.10\build\native\include
  10. D:\NugetPackages\protobuf-v120.2.6.1\build\native\include

2)      库目录:

也是和Debug模式下相似:

Windows下caffe的配置和调用caffe库(二)

  1. D:\caffe-master\Build\x64\Release
  2. D:\NugetPackages\boost_chrono-vc120.1.59.0.0\lib\native\address-model-64\lib
  3. D:\NugetPackages\boost_date_time-vc120.1.59.0.0\lib\native\address-model-64\lib
  4. D:\NugetPackages\boost_filesystem-vc120.1.59.0.0\lib\native\address-model-64\lib
  5. D:\NugetPackages\boost_system-vc120.1.59.0.0\lib\native\address-model-64\lib
  6. D:\NugetPackages\boost_thread-vc120.1.59.0.0\lib\native\address-model-64\lib
  7. D:\NugetPackages\gflags.2.1.2.1\build\native\x64\v120\dynamic\Lib
  8. D:\NugetPackages\glog.0.3.3.0\build\native\lib\x64\v120\Release\dynamic
  9. D:\NugetPackages\hdf5-v120-complete.1.8.15.2\lib\native\lib\x64
  10. D:\NugetPackages\LevelDB-vc120.1.2.0.0\build\native\lib\x64\v120\Release
  11. D:\NugetPackages\lmdb-v120-clean.0.9.14.0\lib\native\lib\x64
  12. D:\NugetPackages\OpenBLAS.0.2.14.1\lib\native\lib\x64
  13. D:\NugetPackages\OpenCV.2.4.10\build\native\lib\x64\v120\Release
  14. D:\NugetPackages\protobuf-v120.2.6.1\build\native\lib\x64\v120\Release

    3)      链接器-->输入:

Windows下caffe的配置和调用caffe库(二)

opencv_core2410.lib

opencv_highgui2410.lib

opencv_imgproc2410.lib

caffe.lib

libcaffe.lib

gflags.lib

libglog.lib

libopenblas.dll.a

libprotobuf.lib

leveldb.lib

lmdb.lib

hdf5.lib

hdf5_hl.lib

libboost_date_time-vc120-mt-s-1_59.lib

libboost_filesystem-vc120-mt-s-1_59.lib

note:

先将D:\caffe-master\Build\x64下生成的Debug和release文件夹中的dll文件拷贝到项目所对应的Debug和release文件夹下。

Windows下caffe的配置和调用caffe库(二)

bug修复:

  1. 提示错误:

Windows下caffe的配置和调用caffe库(二)

解决:在链接器的命令行输入:-D_SCL_SECURE_NO_WARNINGS

Windows下caffe的配置和调用caffe库(二)

  2. 提示错误:

Windows下caffe的配置和调用caffe库(二)

解决在路径:D:\NugetPackages\gflags.2.1.2.1\build\native\x64\v120\dynamic\Lib下。

将对应的库文件拷贝到工程项目中。项目路径为E:\Windows_caffe\caffeTest\x64\Debug。

上一篇:SVN 服务端、客户端安装及配置、导入导出项目


下一篇:DataGridView实现分页