How to hide the cmd window [closed]

asked 2017-08-03 03:22:34 -0500

yode gravatar image

I have a code to show the local image

#include "stdafx.h"
#include "highgui.h"

int main(int argc, char** argv)
    IplImage* img = cvLoadImage("a.png");
    cvNamedWindow("Example1", CV_WINDOW_AUTOSIZE);
    cvShowImage("Example1", img);

It will show the image of course,but it will show a black cmd window.Could we hide the cmd window?

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by berak
close date 2017-08-03 03:29:00.776494


opencv's c-api is no more maintained since 2010, you're no more allowed to use code like that.

please have a look at the tutorials , and try again.

berak gravatar imageberak ( 2017-08-03 03:31:01 -0500 )edit

@berak Could you tell me why it will tag with a relevant or outdated

yode gravatar imageyode ( 2017-08-03 03:31:46 -0500 )edit

btw, assuming you're on win, getting rid of the console window would require to use WinMain instead of main() and a subsystem:windows flag while linking, all of it entirely off-topic here.

berak gravatar imageberak ( 2017-08-03 03:37:02 -0500 )edit