Quantcast

my program using opencv

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

my program using opencv

Sébastien DEWAILLY
Hello,

In order to run an unix program, I installed a few softwares: openni,
opencv. Thanks to macports for that!
However, it lasts an issue with opencv library at the linkage:

mbpdesebastien:build Sebastien$ cmake ..
-- Configuring done
-- Generating done
-- Build files have been written to:
/Users/Sebastien/kinect/LinuxMag-UtilisationDeLaKinect/build
mbpdesebastien:build Sebastien$ make
Scanning dependencies of target main
[ 50%] Building C object CMakeFiles/main.dir/main.c.o
In file included from
/Users/Sebastien/kinect/LinuxMag-UtilisationDeLaKinect/main.c:5:
In file included from /opt/local/include/opencv/highgui.h:45:
In file included from /opt/local/include/opencv2/core/core_c.h:48:
/opt/local/include/opencv2/core/types_c.h:929:13: warning: implicit
declaration
      of function 'cvRound' is invalid in C99
[-Wimplicit-function-declaration]
    ipt.x = cvRound(point.x);
            ^
In file included from
/Users/Sebastien/kinect/LinuxMag-UtilisationDeLaKinect/main.c:8:
In file included from /opt/local/include/ni/XnOpenNI.h:30:
In file included from /opt/local/include/ni/XnUtils.h:35:
/opt/local/include/ni/XnModuleInterface.h:185:3: warning: redefinition of
      typedef 'XnModuleExportedProductionNodeInterface' is a C11 feature
      [-Wtypedef-redefinition]
} XnModuleExportedProductionNodeInterface;
  ^
/opt/local/include/ni/XnTypes.h:272:56: note: previous definition is here
typedef struct XnModuleExportedProductionNodeInterface XnModuleExportedP...
                                                       ^
2 warnings generated.
[100%] Linking C executable main
ld: library not found for -lopencv_shape
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
make[2]: *** [main] Error 1
make[1]: *** [CMakeFiles/main.dir/all] Error 2
make: *** [all] Error 2

It seems that it doesn't find the library opencv_shape.
Any help is welcome,

Sébastien
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: my program using opencv

Joshua Root-8
On 2017-4-4 04:08 , Sébastien DEWAILLY wrote:
> [100%] Linking C executable main
> ld: library not found for -lopencv_shape
> clang: error: linker command failed with exit code 1 (use -v to see
> invocation)
> make[2]: *** [main] Error 1
> make[1]: *** [CMakeFiles/main.dir/all] Error 2
> make: *** [all] Error 2
>
> It seems that it doesn't find the library opencv_shape.

It's hard to tell when the build system doesn't show the actual commands
it is running, but you may need to get -L/opt/local/lib (or wherever
libopencv_shape.dylib is installed) into the flags used when linking,
perhaps by setting an appropriate cmake variable.

- Josh
Loading...