我想在Linux上用icc编译OpenCV,以便用intel工具来分析执行情况。如何用ICC编译OpenCV?
我使用默认选项安装了icc的最新版本。我尝试了“user”(icc安装在我的家中)和“sudo”(icc安装在/ opt中)安装。国际刑事法院的版本是11.1 20090630
我也想过到源iccvars.sh,需要添加路径PATH和LD_LIBRARY_PATH
我也尝试过的OpenCV的几个版本: - 主要的一个:pre1.1。配置根本不识别icc - 'latest_tested_snapshot'和'trunk'版本:icc被配置良好识别(--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
而且finnally错误:
/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
我的人succeded编译OpenCV的使用ICC,让我知道!
该库的官方支持哪种编译器?你是先尝试这个吗?我从来没有这样做过,但如果你想用另一个编译器编译它,你需要自己做一个(很难?)的工作。这两个错误可能会隐藏更多的错误。 – 2009-08-13 13:27:48
是的,编译器icc应该支持OpenCV。 – 2009-08-13 15:08:00