Search code examples
opencvclangstatic-librariesstatic-linking

Opencv-Error while compiling libccv(static library)


I am getting this error

/usr/bin/ld: cannot find -lccv
clang: error: linker command failed with exit code 1 (use -v to see invocation)

while compiling

clang -L"~/ccv/lib" -I"~/ccv/lib" sift.c -lccv `cat ~/ccv/lib/.deps`

(Here ccv/lib is a folder in my computer which contains library libccv.a)

Although I had given the path for finding static library libccv.a,compiler is checking it in /usr/bin.


Solution

  • You can find libraries in

    \usr\local\include\opencv

    So compile using the following destination