DCMTK扩展库之:libiconv编译


DCMTK主要依赖iconv做字符集支持(DICOM字符集,如中文、日文等),详见DCMTK官方说明。

iconv基于GPL公开源代码,是GNU项目的一部分,在各种Unix-like操作系统下很容易编译和使用,对Windows平台下的支持有限。最新版的iconv(目前是libiconv-1.14.tar.gz)已不再提供Visual C++的编译文件,最后一个支持VC编译的iconv版本是libiconv-1.11.1.tar.gz,本文编译以该版本进行。

目的:编译64bit iconv,以提供编译64bit DCMTK所需要的三方库支持。

1、下载libiconv-1.11.1.tar.gz并解压(下载地址:http://ftp.gnu.org/pub/gnu/libiconv/);

2、从Visual Studio x64 Win64 命令提示符(2010)进入解压后的根目录(可以根据自己的需要选择不同命令提示符进入);

3、输入命令:nmake -f Makefile.msvc NO_NLS=1 MFLAGS=-MD;

      具体编译参数见根目录下Makefile.msvc 文件。解释如下:

      #### Start of system configuration section. ####

      # Flags that can be set on the nmake command line:
      #   DLL=1     for compiling a .dll with a stub .lib (default is a static .lib) --------------是否生成DLL
      #             Note that this works only with MFLAGS=-MD.
      #   MFLAGS={-ML|-MT|-MD} for defining the compilation model----------------------此选项较重要,编译选项
      #     MFLAGS=-ML (the default)  Single-threaded, statically linked - libc.lib
      #     MFLAGS=-MT                Multi-threaded, statically linked  - libcmt.lib
      #     MFLAGS=-MD                Multi-threaded, dynamically linked - msvcrt.lib
      #   DEBUG=1   for compiling with debugging information-------------------------------1编译为Debug版本,默认Release
      #   NO_NLS=1  do not use Native Language Support
      #   PREFIX=Some\Directory       Base directory for installation------------------------安装目录,提取头文件和生成的Lib文件到该目录
      #   IIPREFIX=Some\\Directory    Same thing with doubled backslashes
      # Note that nmake command line flags are automatically passed to subdirectory
      # Makefiles. Therefore we don't need to pass them explicitly to subdirectory
      # Makefiles, but the subdirectory Makefiles need to have the same defaults.

4、nmake -f Makefile.msvc NO_NLS=1 MFLAGS=-MD PREFIX=C:\iconv64-MD-release install

完成后在C:\iconv64-MD-release文件夹下会找到需要的文件。


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

伍心

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值