• 旧文备份:windows下编译和使用IT++


    1.下载IT++最新版:<a href="http://sourceforge.net/projects/itpp/">http://sourceforge.net/projects/itpp/</a>目前版本是4.0.6;下载intel 数学库 MKL:<a href="http://www.intel.com/cd/software/products/asmo-na/eng/307757.htm">http://www.intel.com/cd/software/products/asmo-na/eng/307757.htm</a>目前版本是10.1(如果使用AMD的CPU下载ACML),该库收费,可下载一个月的评估版试用。

    2.安装MKL

    3.解压缩IT++,在其win32子目录下有VC的工程,双击文件 itpp_mkl.sln,进入VS2005 IDE环境。

    4.菜单 工具》选项》项目和解决方案》VC++目录;可执行文件中添加MKL可执行文件目录(C:Program FilesIntelMKL10.1.1.022ia32in);包含文件中添加MKL头文件目录(C:Program FilesIntelMKL10.1.1.022include);库文件中添加MKL库访问路径(C:Program FilesIntelMKL10.1.1.022ia32lib).

    5.编译工程,出现以下错误提示:

    ------ 已启动生成: 项目: itpp_mkl, 配置: Release Win32 ------
    正在编译...
    transforms.cpp
    ..itppsignal ransforms.cpp(74) : error C2589: '(' : illegal token on right side of '::'
    ..itppsignal ransforms.cpp(74) : error C2143: syntax error : missing ';' before '::'
    ..itppsignal ransforms.cpp(90) : error C2589: '(' : illegal token on right side of '::'
    ..itppsignal ransforms.cpp(90) : error C2143: syntax error : missing ';' before '::'
    ..itppsignal ransforms.cpp(107) : error C2589: '(' : illegal token on right side of '::'
    ..itppsignal ransforms.cpp(107) : error C2143: syntax error : missing ';' before '::'
    ..itppsignal ransforms.cpp(131) : error C2589: '(' : illegal token on right side of '::'
    ..itppsignal ransforms.cpp(131) : error C2143: syntax error : missing ';' before '::'
    项目 : warning PRJ0018 : 未找到下列环境变量:

    其原因是intel MKL 10.1版本比之前有所改动,造成与IT++匹配问题,找到..itppsignal ransforms.cpp文件,在其中加入一行:

    #ifndef _MSC_VER
    #  include &lt;itpp/config.h&gt;
    #else
    #  include &lt;itpp/config_msvc.h&gt;
    #endif

    #if defined(HAVE_FFT_MKL)
    namespace mkl
    {
    #  include &lt;mkl_dfti.h&gt;
    &lt;--在这里添加:# undef DftiCreateDescriptor
    }
    #elif defined(HAVE_FFT_ACML)
    namespace acml
    {
    #  include &lt;acml.h&gt;

    6.再编译,会通过,同时在IT++ 的win32子目录下生成lib目录,其中根据debug/release选择会产生itpp_debug.lib/itpp.lib,至此IT++ lib文件生成,可以使用了。

    7.现在,通过例程示范,使用IT++ lib,首先在VC环境中指定相关路径。工具》选项》项目和解决方案》VC++目录,在包含文件中再加入IT++头文件路径(E:itpp-4.0.6);在库文件中加入刚才生成的lib文件路径(E:itpp-4.0.6win32lib)。

    8.新建项目工程,选择win32控制台程序,命名test,在IT++tests置目录下随便选择一个测试文件,比如filter_test.cpp,导入该项目。

    9.右键test项目属性》链接器》输入 中附加依赖项,加入 itpp.lib mkl_c_dll.lib,在忽略特定库中添加uuid.lib。

    10选择release编译,执行,会看到控制台窗口执行测试程序。

    (2009.3.2)

  • 相关阅读:
    git创建、删除分支
    Git 基础
    python pillow
    phantomjs 下载
    python3安装PIL
    selenium打开chrome时,出现 "您使用的是不受支持的命令行标记:--ignore-certificate-errors""
    chrome driver 下载
    go 单进程并发
    go 内嵌对象类型
    go 多态
  • 原文地址:https://www.cnblogs.com/winshton/p/4897924.html
Copyright © 2020-2023  润新知