locked
Cannot open include file: 'assert.h': No such file or directory

    Question

  • Hi!

    I use visual studio 2010 professional along with opencv.

    My solutions used to build perfectly fine until now.

    The problem I get is : opencv\include\opencv2/core/types_c.h(55): fatal error C1083: Cannot open include file: 'assert.h': No such file or directory

    I am not sure what went wrong recently so I tried repairing the Microsoft SDK and the entire Visual Studio 2010 professional again but with no use.

    I could not find the assert.h file anywhere in my system strangely.

    Could someone please help me ??

    Regards

    Jujare

    Friday, December 28, 2012 1:12 PM

Answers

  • Hello,

    According to your description, a possible cause of this issue could be the incorrect configuration of “Include Directories”.

    I suggest you checking the "Project->Properties->Configuration Properties->VC++ Directories->Include Directories", adding these directories to it if there are no such options:

    <OpenCV installation path>\OpenCV2.3\build\include;

    <OpenCV installation path>\OpenCV2.3\build\include\opencv;

    <OpenCV installation path>\OpenCV2.3\build\include\opencv2;

    Hope this works.

    Thanks,


    Damon Zheng
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, January 01, 2013 6:42 PM
    Moderator

All replies

  • That header is supposed to be in a directory like C:\Program Files\Microsoft Visual Studio 10.0\VC\include (adjust driver letter and Program Files path accordingly). If it's not there it likely means that there's something wrong with your VS installation, try a repair.
    Friday, December 28, 2012 1:51 PM
  • Hello,

    According to your description, a possible cause of this issue could be the incorrect configuration of “Include Directories”.

    I suggest you checking the "Project->Properties->Configuration Properties->VC++ Directories->Include Directories", adding these directories to it if there are no such options:

    <OpenCV installation path>\OpenCV2.3\build\include;

    <OpenCV installation path>\OpenCV2.3\build\include\opencv;

    <OpenCV installation path>\OpenCV2.3\build\include\opencv2;

    Hope this works.

    Thanks,


    Damon Zheng
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, January 01, 2013 6:42 PM
    Moderator
  • Hi jujare,

    I temporarily mark my reply as answer, if my solution didn't work for your issue, please unmark it.

    Thanks for your understanding.

    Regards,


    Damon Zheng
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Sunday, January 06, 2013 12:08 PM
    Moderator