1

I am trying to run an application compiled in VisualGDB on my Raspberry Pi. In Visual Studio debugging works fine, but I need to run this application on an HDMI monitor. I tried to run the file on RPi, changing the directory to "Project\Debug" and using the command "./MyApp" but it says "MyApp: cannot connect to X server". I am using Raspbian Lite. Since I am an ultra beginner and not really familiar with Linux I don't know how to deal with this problem.

migrated from electronics.stackexchange.com Aug 29 '18 at 12:22

This question came from our site for electronics and electrical engineering professionals, students, and enthusiasts.

  • Did you follow this sample tutorial? visualgdb.com/tutorials/raspberry/qt5 – Mark Aug 29 '18 at 12:43
  • Yes, but this example shows how to debug the application in Visual Studio - there is nothing about how to run it using a HDMI monitor connected to the Raspberry – kajoje Aug 29 '18 at 13:06
  • 1
    sounds like you should run your app on Raspberry (so it would be started in local window - displayed on HDMI screen - and not tunneled to x-window emulator on your Windows machine) and then attach remotely via VS/VisualGDB. Please see if this tutorial visualgdb.com/tutorials/linux/attach will help you. – Mark Aug 29 '18 at 13:11
  • I am trying to fallow this tutorial, but when I type "sudo apt-get build-dep mc" and "apt-get source mc", I get "E: You must put some 'source' URIs in your sources.list". I opened the file using "sudo nano /etc/apt/sources.list" and there are 3 lines: 1. deb http:raspbian.raspberrypi.org... 2. #uncoment line below then 'apt-get update' to enable 'apt-get source' 3. #deb-src http:/raspbian.raspberrypi.org... - What should I add here to be able to use commands "sudo apt-get build-dep mc" and "apt-get source mc"? – kajoje Aug 29 '18 at 15:50
  • that's just a sample source code for demonstration purposes (they used Midnight Commander sources to do that). So just skip this part and substitute it with your program source code. – Mark Aug 30 '18 at 4:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.