Sublime Forum

Sublime cannot autocomplete header files and opencv functions


Hi! I am rather new to sublime and I hope to get autocomplete for my project. I have used EasyClangComplete package to autocomplete the functions in C++ STL and it works. However, I still got some problems when I tried to get autocomplete for header files and functions in OpenCV, which I need for my project. Please see the attached picture.

  1. For the header, I have to use “…/include/Solution.hpp” to remove the compile error in sublime. When I use “Solution.hpp”, I get a bunch of “undeclared identifier” errors.

  2. Also, I need to use functions in OpenCV. However, I cannot get any popup/autocomplete when I typed “img.”. The autocomplete is not working.

What I did for EasyClangComplete is adding path to include folder and OpenCV:

"common_flags" : [
    // some example includes
    // this is needed to include the correct headers for clang
    // For simple projects, you can add a folder where your current file is


But it seems not working. I’m not sure what is the correct way to do this and how I can get the autocomplete for headers and OpenCV. Any help is appreciated!