exit() function doesn't work when cv.h included, LINUX

asked 2013-05-08 18:16:03 -0600

Newbie in openCV, but can't find any similar report in forums......

I have been trying to figure out why the standard exit() function in C does not work when I include the cv.h header statement in my program, yet works when cv.h is commented out.

Using: Ubuntu 12.04 LTS gcc compiler version 4.6.3.
openCV 2.4.3

Any help would be appreciated.

Here is some very simple code to demonstrate:

#include <stdio.h>
#include <stdlib.h>
//remove comment flag below and recompile
//#include <cv.h>  

int main()
{
    int a = 0;

    if (a == 1){  
        printf("A = 1\n");
        exit(1);
        }       
    else {  
        printf("A = %i \n",a); 
        exit(0);
        }       
}
edit retag flag offensive close merge delete