compiling code with opencv - /usr/bin/ld: cannot find -lippicv

前端 未结 5 931
执笔经年
执笔经年 2020-12-16 21:56

When compiling some code with opencv I get this error

# g++ txtbin-03.1.cpp -o txtbin `pkg-config opencv --cflags --libs`
/usr/bin/ld: cannot fi         


        
5条回答
  •  悲&欢浪女
    2020-12-16 22:56

    Recompiling whole library isn't necessary, especially if you don't need this library. I found great and instantly working solution here. In case link expired or broke:

    The solution is simply to remove -lippicv from opencv pkg-config configuration file. So you have to locate opencv.pc file, which default is in /usr/local/lib/pkgconfig/ directory. Then from section Libs: just remove aforementioned library.

提交回复
热议问题