Third: VS2012, call the OpenCV library, in the program defined variables, compile no problem, the runtime will error "variable use undefined" _vs2012

Source: Internet
Author: User

I initialize the initialization of the function, but can start to run, but after a while will be an error, the use of variables are not defined, error screenshot


Finally, the program uses the variable when it calls the function, I use this variable to save a number, the next call will be used, so it will error, because the function inside the variable after the function call to release the variable, the number of storage does not exist, the next time, the number of storage does not exist. So it will report this mistake, cause we actually defined, the error is not defined. The correct approach is to define the variable as a global variable, and the problem is solved.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.