“Gtk-WARNING **: cannot open display:” when running a gtkmm project in Eclipse

后端 未结 1 1110
清酒与你
清酒与你 2021-01-14 23:10

I\'m trying to run a gtkmm project in Eclipse CDT (On Ubuntu). The project compiles fine, there are no errors reported but when I try to run the project the console prints o

相关标签:
1条回答
  • 2021-01-14 23:58

    It sounds like the the "DISPLAY" environment variable is not being set in the environment used by eclipse to launch your application.

    To check this, Edit the Run Configuration for the the program you are trying to launch. Next, select the Environment tab. If there is a DISPLAY variable already set, make sure it is correct (usually it should be ":0.0"). If there is not one, create one and set it to ":0.0".

    0 讨论(0)
提交回复
热议问题