DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

SolBeen Kwon
SolBeen Kwon

Posted on

[C++] #include opencv2.xxx.h no such file or directory

  • because /usr/include does not have opencv2 folder or opencv2/xxx.h header file

  • If you installed opencv4, you might have installed the opencv installation path on /usr/local/ during installation.

  • /usr/local/include/opencv4/opencv2 folder can be found to have the xxx.h header file!

20210402_143602

λ”°λΌμ„œ

#include <opencv4/opencv2/xxxx.h>
Enter fullscreen mode Exit fullscreen mode

====================================================
c++ include κΈ°λ³Έ 경둜λ₯Ό λ³΄λŠ” λͺ…λ Ήμ–΄λŠ”
echo | gcc -v -x c -E -
echo | gcc -v -x c++ -E -

=================================================
makeν–ˆμ„λ•Œ κ²½λ‘œμ—λŸ¬κ°€ λ‚œλ‹€λ©΄ Makefile 에

μ»΄νŒŒμΌμ‹œ include 경둜λ₯Ό μΆ”κ°€ν•΄μ£Όλ©΄ λœλ‹€.
20210402_143429

Top comments (0)

πŸ‘‹ Every week new members join DEV and share a bit about them in our Welcome Thread

Β 
Welcome them to DEV and share a bit about yourself