Windows下编译DCMTK

原帖地址:http://www.cnblogs.com/yinxufeng/p/3636241b7084b0340cc56fd37f9e2fd8.html

下载源码

生成VS项目工程

  1. 设置source code路径: “E:/libsupport/dcmtk-3.6.1/dcmtk-3.6.1_20160216”
  2. 设置binaries路径: “E:/libsupport/dcmtk-3.6.1/dcmtk-3.6.1_20160216_vs2008”
  3. 点击Configure,选择visual studio 2008(或者其他已经安装的版本)
  4. 等待Configure完毕
  5. 红色区域设置,选中Advance
    • 搜索”install”,修改CMAKE_INSTALL_PREFIX路径: “E:/libsupport/dcmtk-3.6.1/dcmtk-3.6.1_20160216_vs2008/install”
    • 搜索”modules”,修改DCMTK_MODULES,自定义需要生成的模块
      (默认是:ofstd;oflog;dcmdata;dcmimgle;dcmimage;dcmjpeg;dcmjpls;dcmtls;dcmnet;dcmsr;dcmsign;dcmwlm;dcmqrdb;dcmpstat;dcmrt;dcmiod;dcmfg;dcmseg
      我目前只用到了ofstd;oflog;dcmdata;dcmimgle;dcmimage;dcmjpeg)
    • 从3.6.1开始支持生成dll了,只要勾选上BUILD_SHARED_LIBS;如果想最终只生成一个单独的”“,再勾选上BUILD_SINGLE_SHARED_LIBRARY
    • 搜索”cxx”,根据需要修改编译选项为MD/MT
  6. 点击Generate,生成VS工程

编译源码

  1. 用VS打开”e:\libsupport\dcmtk-3.6.1\dcmtk-3.6.1_20160216_vs2008\DCMTK.sln”
  2. 根据自己需要选择项目Configuration为Debug/Release
  3. 生成ALL_BUILD
  4. 生成INSTALL,完毕后将在之前设置CMAKE_INSTALL_PREFIX路径下存放DCMTK的includelib
posted @ 2016-04-07 13:42  HoneyComb  阅读(1073)  评论(1编辑  收藏  举报