using highgui - difficulties with namedWindow [closed]

asked 2012-08-17 12:12:15 -0500

gp gravatar image

Dear all,

I am new with openCV, I am trying to use the graphical interface highgui.

I have tried the following very simple piece of code, which is compiled properly, but when I run it I get an error message like

"Unhandled exception at 0x774f15de in try1.exe: 0xC0000005: Access violation reading location 0xcccc006f."

What am I doing wrong?

Here is the code:

// try1.cpp : Defines the entry point for the console application.

#include "stdafx.h"
#include <iostream>
#include "opencv2/core/core.hpp"
#include "opencv2/highgui/highgui.hpp"
//#include "myfunc.h"

using namespace std;
using namespace cv;

int _tmain(int argc, _TCHAR* argv[])
   return 0;

I don't know if it matters, I have created a C++ console application with Visual Studio 10.

I thank you for your very kind help.

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by sturkmen
close date 2016-01-05 02:40:55.873453


just out of curiosity... is there any special reason why you are using _tmain??

I would recommend creating a project (console base) and specifying that there is NO code added when created. Later you will add an empty cpp file in which you will write the normal int main().

I am doing that and have no problem whatsoever. (also using VS 10 express)

KansaiRobot gravatar imageKansaiRobot ( 2015-01-26 18:27:45 -0500 )edit