windows编译mxnet,boost,dlib库

windows编译mxnet,boost,dlib库

由于修改了这些库中的源代码不能直接用编译之后的,所以需要进行重新编译:

  • mxnet编译过程中的问题
  • boost库编译问题
  • dlib编译中问题

mxnet

按照官网说的进行编译[^footnote].
Firstly, we should make your Visual Studio 2013 support more C++11 features.
Download and install Visual C++ Compiler Nov 2013 CTP.
Copy all files in C:\Program Files (x86)\Microsoft Visual C++ Compiler Nov 2013 CTP (or the folder where you extracted the zip archive) to C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC and overwrite all existed files. Don’t forget to backup the original files before copying.
Secondly, fetch the third-party libraries, including OpenCV, CuDNN and OpenBlas(ignore this if you have MKL).
NOTICE: You need to register as a NVIDIA community user to get the download link of CuDNN.
Finally, use CMake to create a Visual Studio solution in ./build/. During configuration, you may need to set the path of each third-party library, until no error is reported. (Set environmental variable OpenBLAS_HOME to the OpenBLAS directory containing include and lib; set OpenCV_DIR to the build directory after unpacking the OpenCV package.) Open the solution and compile, you will get a mxnet.dll in ./build/Release or ./build/Debug.
.XXX\mxnet-face\build\Release
把这里的lib dll等拷贝到需要用mxnet的地方
先用cmake编译mxnet,要设置opencv的路径
设置configure,x64,release版本,所有的版本都是一致的才行
import mxnet时说找不到dll,然后我手工把libmxnet.dll和libmxnet.lib文件放到..mxnet\python\mxnet目录下就解决了
cd python; sudo python setup.py install

boost,dlib

step 1: 打开Developer Command Prompt for VS2015命令行窗口
step 2: 执行bootstrap.bat,产生bjam.exe
step 3:
  全部编译的命令行:bjam –toolset=msvc-14.0 –build-type=complete stage  部分编译的命令行:bjam –toolset=msvc-14.0 –with-date_time –with-thread  编译成64位的命令:bjam –toolset=msvc-14.0 address-model=64 –build-type=complete stage   查看需要编译库的命令行:bjam –show-libraries
bjam –toolset=msvc-14.0 address-model=64 –with-date_time –with-thread –with-chrono link=static runtime-link=static –stagedir=”./bin/vs15_64” release

bjam –with-python link=shared runtime-link=shared
、修改bjam 的配置文件,在D:\boost_1_47_0\tools\build\v2 用文本编辑器打开user-config.jam 这个文件,
修改其中的设置,将

Configure specific msvc version (searched for in standard locations and PATH).

using msvc : 14.0 ;

Dlib Python setup.py install –cmake XXXcmake.exepath(没有=号)

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值