opencv - craycc 和 OpenCV

标签 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

最佳答案

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

关于opencv - craycc 和 OpenCV,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11706320/

相关文章:

c++ - 哪种分类器可用于使用 C++ 和 OpenCV 进行铁路线检测?

stdout - 在 MPI 中排序输出

c - 尝试使用 MPI_Recv 接收 vector

c++ - 从多个并行可执行文件写入单个文件的最佳方法

c - 从 FORTRAN 90 调用 C 例程的不同数字参数

64-bit - Cray mpich 是否有 64 位整数 MPI 变量?

python - 在python中使用opencv在图像的高斯模糊期间出现错误。代码之前运行正常,并且突然出现错误

OpenCV GPU 模糊很慢

eclipse - eclipse pydev 中的 anaconda opencv Unresolved 导入