none
VS 2015 community edition not finding include files

    Question

  • Hello,

      I tried to install OpenCV and use Microsoft Visual Studio Community edition 2015 on my Windows 7 laptop. One problem is that I cannot get the smallest demo C++ program to work because the compiler always complains that it cannot find the OpenCV  include files.

    I put my OpenCV build here

    d:\openCV\openCV3.1\

    and so the file 

    d:\openCV\openCV3.1\build\include\opencv2\opencv.hpp

    really exists

    My C++ solution was created as a ConsoleApplication, checking "Empty Project".

    In the project properties I edited "Additional Include Directories" so as to add 

    d:\openCV\openCV3.1\build\include

    but that does not suffice. I keep on getting a message "Cannot open include file opencv.hpp", despite the fact that it's there.

    Curiously I have created other applications and have never run into this problem.

    Sunday, February 28, 2016 5:38 AM

Answers

  • OK, this turns out to be a newbie's mistake:

    The property sheet was for the debug configuration whereas compilation was set for the release configuration. I wish the GUI would not allow this to happen so easily and silently.

    Sunday, February 28, 2016 10:23 AM

All replies

  • OK, this turns out to be a newbie's mistake:

    The property sheet was for the debug configuration whereas compilation was set for the release configuration. I wish the GUI would not allow this to happen so easily and silently.

    Sunday, February 28, 2016 10:23 AM
  • Hi jbidouile,

    Thanks for your post and share your update here.

    >>Cannot open include file opencv.hpp", despite the fact that it's there.

    Have this error been solved now? If you have any other problem, please feel free to share here.

    >>I wish the GUI would not allow this to happen so easily and silently

    By the way, if you feel the GUI is not correct. I suggest you could submit as a feature request:

    http://visualstudio.uservoice.com/forums/121579-visual-studio

    The Visual Studio product team is listening to user voice there. You can send your idea there so the others can vote it.

    Thanks for your understanding.


    Best Regards,

    Lake Xiao

    Tuesday, March 01, 2016 1:58 AM
    Moderator