我正在尝试在 Linux 上使用 icc 编译 OpenCV,以便使用英特尔工具分析执行情况。
我使用默认选项安装了最新版本的 icc。我尝试了“用户”(icc 安装在我家中)和“sudo”(icc 安装在 /opt 中)安装。icc的版本是11.1 20090630
我还想获取 iccvars.sh,将所需的路径添加到 PATH 和 LD_LIBRARY_PATH
我还尝试了几个版本的 OpenCV: - 主要版本:pre1.1。configure 根本不识别 icc - 'latest_tested_snapshot' 和 'trunk' 版本: icc 被 configure 很好地识别(--enable-openmp 产生 -openmp 选项,而不是 -fopenmp)
当我制作时,一切似乎都很好,直到编译中间。然后总是有很多关于“操作员”的警告(可能有一百个)。这里有一个例子:
../include/opencv/cxcore.hpp(335): warning #597: "cv::Size_<_Tp>::operator cv::Size_<float>() const [with
_Tp=float]" will not be called for implicit or explicit conversions
operator Size_<float>() const;
^
detected during instantiation of class "cv::Size_<_Tp> [with _Tp=float]" at line 394
最后是错误:
/bin/bash ../../../libtool --tag=CXX --mode=compile icpc -DHAVE_CONFIG_H -I. -I../../.. -I../../../include/opencv -I. -DCV_NO_BACKWARD_COMPATIBILITY -fPIC -I/usr/include/python2.6 -g -O2 -MT _highgui_la-pyhelpers.lo -MD -MP -MF .deps/_highgui_la-pyhelpers.Tpo -c -o _highgui_la-pyhelpers.lo `test -f 'pyhelpers.cpp' || echo './'`pyhelpers.cpp
_ml.cpp(36134): error: argument of type "uchar={unsigned char} *" is incompatible with parameter of type "int *"
result = (int)(arg1)->get_ord_var_data(arg2,arg3,arg4,arg5,(float const **)arg6,(uchar const **)arg7);
^
_ml.cpp(36134): error: argument of type "const uchar={unsigned char} **" is incompatible with parameter of type "const int **"
result = (int)(arg1)->get_ord_var_data(arg2,arg3,arg4,arg5,(float const **)arg6,(uchar const **)arg7);
^
compilation aborted for _ml.cpp (code 2)
make[4]: *** [_ml_la-_ml.lo] Erreur 1
我有人成功用 icc 编译 OpenCV,请告诉我!