Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How edit the dockerfile and yml file to show GUI? #7

Open
opptimus opened this issue Dec 14, 2019 · 0 comments
Open

How edit the dockerfile and yml file to show GUI? #7

opptimus opened this issue Dec 14, 2019 · 0 comments

Comments

@opptimus
Copy link

I want to use clion on win10 with Remote Docker Container debugging Env(OpenCV 4) Of Ubuntu 18.04.I install Docker in my local machine(win10). Thanks to https://github.com/shuhaoliu/docker-clion-dev, I use your Dockerfile and yml file:

It works well with many C++ library,but I want to use OpenCV4 Library,I want to run this CPP file:

#include <opencv2/opencv.hpp>
#include <iostream>
using namespace cv;
using namespace std;
int main(int argc, char* argv[]) {
    Mat src = imread("/code/001.png");

    if (src.empty()) {
        printf("cannot load images!\n");
        return -1;
    }
    namedWindow("show_photo", WINDOW_AUTOSIZE);
    imshow("show_photo", src);

    return 0;
}

It shows that: **(show images:314): Gtk-WARNING : 09:56:09.309: cannot open display:

I found some information,But they are all about entering the command line, how to modify the dockerfile and yml file?? Please master programmers help me!

My IDE is Clion on Win10,I already install Xming on win10 and knows the X0.hosts .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant