craycc and OpenCV

526 views Asked by At

I'm trying to compile a simple hello world type program that reads an image file with OpenCv while MPI is initialised using. It works fine with gcc (mpicc), but I'm trying to use craycc for reasons I won't get into. When I do this, I get an errors that all the libraries are not found. It seems to be looking in a strange path.

Can anyone take some guesses at what's happening here? Could my pkg-config opencv.pc file be giving the wrong path? Is the typedef error triggering this (when I find the line and comment it out the warning disappears by the missing libraries remain)?

I'll try sleeping on it and see what comes up. Thanks for taking the time to read this folks, and I'll be sure to report back if I find anything.

@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

There are 1 answers

0
benrules2 On BEST ANSWER

Solved this by adding a -dynamic flag when compiling.