craycc和OpenCV

时间:2012-07-29 03:04:24

标签: opencv mpi cray

我正在尝试编译一个简单的hello world类型程序,该程序在使用时初始化MPI时使用OpenCv读取图像文件。它适用于gcc(mpicc),但我正在尝试使用craycc,原因是我不会进入。当我这样做时,我得到一个错误,找不到所有的库。它似乎在寻找一条奇怪的道路。

有人可以对这里发生的事情进行一些猜测吗?我的pkg-config opencv.pc文件可能是错误的路径吗?是否触发了typedef错误(当我找到该行并将其注释掉时,警告会因丢失的库而消失)?

我会尝试睡觉,看看会发生什么。感谢您花时间阅读这些人,如果我找到任何内容,我一定会报告。

@hector-xe6-7:~/work/disparity> cc `pkg-config --cflags --libs opencv` hello.c -o hello

CC-301 craycc: WARNING File = /home/d34/d34/s1138832/work/OpenCV-2.3/include/opencv2/core/types_c.h, Line = 159
  The indicated "typedef" name has already been declared (with same type).

  typedef unsigned short ushort;
                         ^

Total warnings detected in hello.c: 1
/opt/cray/cce/8.0.4/cray-binutils/x86_64-unknown-linux-gnu/bin/ld: cannot find -lopencv_core
/opt/cray/cce/8.0.4/cray-binutils/x86_64-unknown-linux-gnu/bin/ld: cannot find -lopencv_imgproc
/opt/cray/cce/8.0.4/cray-binutils/x86_64-unknown-linux-gnu/bin/ld: cannot find -lopencv_highgui
/opt/cray/cce/8.0.4/cray-binutils/x86_64-unknown-linux-gnu/bin/ld: cannot find -lopencv_ml
/opt/cray/cce/8.0.4/cray-binutils/x86_64-unknown-linux-gnu/bin/ld: cannot find -lopencv_video
/opt/cray/cce/8.0.4/cray-binutils/x86_64-unknown-linux-gnu/bin/ld: cannot find -lopencv_features2d
/opt/cray/cce/8.0.4/cray-binutils/x86_64-unknown-linux-gnu/bin/ld: cannot find -lopencv_calib3d
/opt/cray/cce/8.0.4/cray-binutils/x86_64-unknown-linux-gnu/bin/ld: cannot find -lopencv_objdetect
/opt/cray/cce/8.0.4/cray-binutils/x86_64-unknown-linux-gnu/bin/ld: cannot find -lopencv_contrib
/opt/cray/cce/8.0.4/cray-binutils/x86_64-unknown-linux-gnu/bin/ld: cannot find -lopencv_legacy
/opt/cray/cce/8.0.4/cray-binutils/x86_64-unknown-linux-gnu/bin/ld: cannot find -lopencv_flann

1 个答案:

答案 0 :(得分:1)

通过在编译时添加-dynamic标志解决了这个问题。